Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields | Protected Attributes
Layout Class Reference
Inheritance diagram for Layout:
AbstractComponent DataObject UiComponentInterface BlockInterface

Public Member Functions

 __construct (ContextInterface $context, LayoutPool $layoutPool, $type, array $components=[], array $data=[])
 
 getComponentName ()
 
 prepare ()
 
 getStructure ()
 
- Public Member Functions inherited from AbstractComponent
 __construct (ContextInterface $context, array $components=[], array $data=[])
 
 getContext ()
 
 getName ()
 
 prepare ()
 
 toHtml ()
 
 render ()
 
 addComponent ($name, UiComponentInterface $component)
 
 getComponent ($name)
 
 getChildComponents ()
 
 renderChildComponent ($name)
 
 getTemplate ()
 
 getConfiguration ()
 
 getJsConfig (UiComponentInterface $component)
 
 setData ($key, $value=null)
 
 getData ($key='', $index=null)
 
 prepareDataSource (array $dataSource)
 
 getDataSourceData ()
 
- Public Member Functions inherited from DataObject
 __construct (array $data=[])
 
 addData (array $arr)
 
 setData ($key, $value=null)
 
 unsetData ($key=null)
 
 getData ($key='', $index=null)
 
 getDataByPath ($path)
 
 getDataByKey ($key)
 
 setDataUsingMethod ($key, $args=[])
 
 getDataUsingMethod ($key, $args=null)
 
 hasData ($key='')
 
 toArray (array $keys=[])
 
 convertToArray (array $keys=[])
 
 toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true)
 
 convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true)
 
 toJson (array $keys=[])
 
 convertToJson (array $keys=[])
 
 toString ($format='')
 
 __call ($method, $args)
 
 isEmpty ()
 
 serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"')
 
 debug ($data=null, &$objects=[])
 
 offsetSet ($offset, $value)
 
 offsetExists ($offset)
 
 offsetUnset ($offset)
 
 offsetGet ($offset)
 

Data Fields

const NAME = 'layout'
 

Protected Attributes

 $layoutPool
 
 $type
 
 $layoutTypeObject
 
 $structure = []
 
- Protected Attributes inherited from AbstractComponent
 $context
 
 $components
 
 $componentData = []
 
 $dataSources = []
 
- Protected Attributes inherited from DataObject
 $_data = []
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractComponent
 prepareChildComponent (UiComponentInterface $component)
 
 initObservers (array & $data=[])
 
- Protected Member Functions inherited from DataObject
 _getData ($key)
 
 _underscore ($name)
 
- Static Protected Attributes inherited from DataObject
static $_underscoreCache = []
 

Detailed Description

Class Layout

Definition at line 16 of file Layout.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( ContextInterface  $context,
LayoutPool  $layoutPool,
  $type,
array  $components = [],
array  $data = [] 
)

Constructor

Parameters
ContextInterface$context
LayoutPool$layoutPool
string$type
array$components
array$data

Definition at line 49 of file Layout.php.

Member Function Documentation

◆ getComponentName()

getComponentName ( )

Get component name

Returns
string

Implements UiComponentInterface.

Definition at line 66 of file Layout.php.

67  {
68  return static::NAME;
69  }

◆ getStructure()

getStructure ( )
Returns
array

Definition at line 86 of file Layout.php.

87  {
88  return $this->structure;
89  }

◆ prepare()

prepare ( )

Register component and build layout structure

Prepare component configuration

Returns
void

Implements UiComponentInterface.

Definition at line 76 of file Layout.php.

77  {
78  $this->layoutTypeObject = $this->layoutPool->create($this->type);
79  $this->structure = $this->layoutTypeObject->build($this);
80  parent::prepare();
81  }

Field Documentation

◆ $layoutPool

$layoutPool
protected

Definition at line 23 of file Layout.php.

◆ $layoutTypeObject

$layoutTypeObject
protected

Definition at line 33 of file Layout.php.

◆ $structure

$structure = []
protected

Definition at line 38 of file Layout.php.

◆ $type

$type
protected

Definition at line 28 of file Layout.php.

◆ NAME

const NAME = 'layout'

Definition at line 18 of file Layout.php.


The documentation for this class was generated from the following file: