|
| | getUpdate () |
| |
| | generateXml () |
| |
| | generateElements () |
| |
| | renderElement ($name, $useCache=true) |
| |
| | addOutputElement ($name) |
| |
| | getOutput () |
| |
| | hasElement ($name) |
| |
| | unsetElement ($name) |
| |
| | getAllBlocks () |
| |
| | getBlock ($name) |
| |
| | getChildBlock ($parentName, $alias) |
| |
| | setChild ($parentName, $elementName, $alias) |
| |
| | reorderChild ($parentName, $childName, $offsetOrSibling, $after=true) |
| |
| | unsetChild ($parentName, $alias) |
| |
| | getChildNames ($parentName) |
| |
| | getChildBlocks ($parentName) |
| |
| | getChildName ($parentName, $alias) |
| |
| | addToParentGroup ($blockName, $parentGroupName) |
| |
| | getGroupChildNames ($blockName, $groupName) |
| |
| | getParentName ($childName) |
| |
| | createBlock ($type, $name='', array $arguments=[]) |
| |
| | addBlock ($block, $name='', $parent='', $alias='') |
| |
| | addContainer ($name, $label, array $options=[], $parent='', $alias='') |
| |
| | renameElement ($oldName, $newName) |
| |
| | getElementAlias ($name) |
| |
| | removeOutputElement ($name) |
| |
| | getMessagesBlock () |
| |
| | getBlockSingleton ($type) |
| |
| | getElementProperty ($name, $attribute) |
| |
| | isBlock ($name) |
| |
| | isContainer ($name) |
| |
| | isManipulationAllowed ($name) |
| |
| | setBlock ($name, $block) |
| |
| | isCacheable () |
| |
Interface LayoutInterface @api
- Since
- 100.0.2
Definition at line 13 of file LayoutInterface.php.
◆ addBlock()
| addBlock |
( |
|
$block, |
|
|
|
$name = '', |
|
|
|
$parent = '', |
|
|
|
$alias = '' |
|
) |
| |
Add a block to registry, create new object if needed
- Parameters
-
| string | \Magento\Framework\View\Element\AbstractBlock | $block | |
| string | $name | |
| string | $parent | |
| string | $alias | |
- Returns
- Element\BlockInterface
Implemented in Layout, and Proxy.
◆ addContainer()
| addContainer |
( |
|
$name, |
|
|
|
$label, |
|
|
array |
$options = [], |
|
|
|
$parent = '', |
|
|
|
$alias = '' |
|
) |
| |
Insert container into layout structure
- Parameters
-
| string | $name | |
| string | $label | |
| array | $options | |
| string | $parent | |
| string | $alias | |
- Returns
- void
Implemented in Proxy.
◆ addOutputElement()
| addOutputElement |
( |
|
$name | ) |
|
◆ addToParentGroup()
| addToParentGroup |
( |
|
$blockName, |
|
|
|
$parentGroupName |
|
) |
| |
Add element to parent group
- Parameters
-
| string | $blockName | |
| string | $parentGroupName | |
- Returns
- bool
Implemented in Layout, and Proxy.
◆ createBlock()
| createBlock |
( |
|
$type, |
|
|
|
$name = '', |
|
|
array |
$arguments = [] |
|
) |
| |
Block Factory
- Parameters
-
| string | $type | |
| string | $name | |
| array | $arguments | |
- Returns
- Element\BlockInterface
Implemented in Layout, and Proxy.
◆ generateElements()
Create structure of elements from the loaded XML configuration
- Returns
- void
Implemented in Layout, and Proxy.
◆ generateXml()
◆ getAllBlocks()
Retrieve all blocks from registry as array
- Returns
- array
Implemented in Layout, and Proxy.
◆ getBlock()
Get block object by name
- Parameters
-
- Returns
- Element\BlockInterface|bool
Implemented in Layout, and Proxy.
◆ getBlockSingleton()
| getBlockSingleton |
( |
|
$type | ) |
|
Get block singleton
- Parameters
-
- Returns
- Element\BlockInterface
Implemented in Layout, and Proxy.
◆ getChildBlock()
| getChildBlock |
( |
|
$parentName, |
|
|
|
$alias |
|
) |
| |
Get child block if exists
- Parameters
-
| string | $parentName | |
| string | $alias | |
- Returns
- null
Implemented in Layout, and Proxy.
◆ getChildBlocks()
| getChildBlocks |
( |
|
$parentName | ) |
|
Get list of child blocks
Returns associative array of <alias> => <block instance>="">
- Parameters
-
- Returns
- array
Implemented in Layout, and Proxy.
◆ getChildName()
| getChildName |
( |
|
$parentName, |
|
|
|
$alias |
|
) |
| |
Get child name by alias
- Parameters
-
| string | $parentName | |
| string | $alias | |
- Returns
- bool|string
Implemented in Layout, and Proxy.
◆ getChildNames()
| getChildNames |
( |
|
$parentName | ) |
|
Get list of child names
- Parameters
-
- Returns
- array
Implemented in Layout, and Proxy.
◆ getElementAlias()
Get element alias by name
- Parameters
-
- Returns
- bool|string
Implemented in Layout, and Proxy.
◆ getElementProperty()
| getElementProperty |
( |
|
$name, |
|
|
|
$attribute |
|
) |
| |
Get property value of an element
- Parameters
-
| string | $name | |
| string | $attribute | |
- Returns
- mixed
Implemented in Layout, and Proxy.
◆ getGroupChildNames()
| getGroupChildNames |
( |
|
$blockName, |
|
|
|
$groupName |
|
) |
| |
Get element names for specified group
- Parameters
-
| string | $blockName | |
| string | $groupName | |
- Returns
- array
Implemented in Layout, and Proxy.
◆ getMessagesBlock()
Retrieve messages block
- Returns
- \Magento\Framework\View\Element\Messages
Implemented in Layout, and Proxy.
◆ getOutput()
Get all blocks marked for output
- Returns
- string
Implemented in Layout, and Proxy.
◆ getParentName()
| getParentName |
( |
|
$childName | ) |
|
Gets parent name of an element with specified name
- Parameters
-
- Returns
- bool|string
Implemented in Layout, and Proxy.
◆ getUpdate()
Retrieve the layout processor
- Returns
- Layout\ProcessorInterface
Implemented in Layout, and Proxy.
◆ hasElement()
Check if element exists in layout structure
- Parameters
-
- Returns
- bool
Implemented in Layout, and Proxy.
◆ isBlock()
Whether specified element is a block
- Parameters
-
- Returns
- bool
Implemented in Layout, and Proxy.
◆ isCacheable()
Check is exists non-cacheable layout elements
- Returns
- bool
Implemented in Layout, Proxy, and Layout.
◆ isContainer()
Checks if element with specified name is container
- Parameters
-
- Returns
- bool
Implemented in Layout, and Proxy.
◆ isManipulationAllowed()
| isManipulationAllowed |
( |
|
$name | ) |
|
Whether the specified element may be manipulated externally
- Parameters
-
- Returns
- bool
Implemented in Layout, and Proxy.
◆ removeOutputElement()
| removeOutputElement |
( |
|
$name | ) |
|
◆ renameElement()
| renameElement |
( |
|
$oldName, |
|
|
|
$newName |
|
) |
| |
Rename element in layout and layout structure
- Parameters
-
| string | $oldName | |
| string | $newName | |
- Returns
- bool
Implemented in Layout, and Proxy.
◆ renderElement()
| renderElement |
( |
|
$name, |
|
|
|
$useCache = true |
|
) |
| |
Find an element in layout, render it and return string with its output
- Parameters
-
| string | $name | |
| bool | $useCache | |
- Returns
- string
Implemented in Layout, and Proxy.
◆ reorderChild()
| reorderChild |
( |
|
$parentName, |
|
|
|
$childName, |
|
|
|
$offsetOrSibling, |
|
|
|
$after = true |
|
) |
| |
Reorder a child of a specified element
If $offsetOrSibling is null, it will put the element to the end If $offsetOrSibling is numeric (integer) value, it will put the element after/before specified position Otherwise – after/before specified sibling
- Parameters
-
| string | $parentName | |
| string | $childName | |
| string | int | null | $offsetOrSibling | |
| bool | $after | |
- Returns
- void
Implemented in Layout, and Proxy.
◆ setBlock()
| setBlock |
( |
|
$name, |
|
|
|
$block |
|
) |
| |
Save block in blocks registry
- Parameters
-
| string | $name | |
| Element\BlockInterface | $block | |
- Returns
- LayoutInterface
Implemented in Layout, and Proxy.
◆ setChild()
| setChild |
( |
|
$parentName, |
|
|
|
$elementName, |
|
|
|
$alias |
|
) |
| |
Set child element into layout structure
- Parameters
-
| string | $parentName | |
| string | $elementName | |
| string | $alias | |
- Returns
- LayoutInterface
Implemented in Layout, and Proxy.
◆ unsetChild()
| unsetChild |
( |
|
$parentName, |
|
|
|
$alias |
|
) |
| |
Remove child element from parent
- Parameters
-
| string | $parentName | |
| string | $alias | |
- Returns
- LayoutInterface
Implemented in Layout, and Proxy.
◆ unsetElement()
The documentation for this interface was generated from the following file: