Skip to content

Latest commit

 

History

History
65 lines (40 loc) · 1.33 KB

Columns.md

File metadata and controls

65 lines (40 loc) · 1.33 KB

◄ Back to index

Columns icon Joomla\Content\Element\Columns

This element is a container for columns, i.e., (block) elements arranged horizontally.

Usage

$columnsElement = new Columns( [ ContentElementInterface[] $elements [, array $params ] ] );

or

$columnsElement = Columns::from( ContentElementInterface $data [, array $mapping [, array $params ] ] );

Properties

Property Type Description Required
elements ContentElementInterface[] The child elements -

Elements

Get the child elements.

$elements = $columnsElement->getElements();

Parameters

Parameters are optional settings for the presentation. All elements can have 'id' and 'class' parameters; other depend on environment and/or renderer.

Parameter Type Description
id string The ID of the element
class string CSS class

Parameter List

Get an associative array with all parameters.

$params = $columnsElement->getParameters();

Single Parameter

Retrieve a single parameter. Default should be provided.

$id    = $columnsElement->getParameter( 'id' [, $default ] );
$class = $columnsElement->getParameter( 'class' [, $default ] );

Examples