Class Mage_Core_Model_Layout

Description

Layout model

Located in /Core/Model/Layout.php (line 34)

Varien_Simplexml_Config
   |
   --Mage_Core_Model_Layout
Variable Summary
Method Summary
static string findTranslationModuleName ( $node)
Mage_Core_Model_Layout __construct ([array $data = array()])
Mage_Core_Block_Abstract addBlock ( $block, string $blockName, string|Mage_Core_Block_Abstract $blockClass)
void addOutputBlock (string $blockName, [string $method = 'toHtml'])
Mage_Core_Block_Abstract createBlock (string $type, [ $name = ''], [ $attributes = array()], string $blockName)
void generateBlocks ([Mage_Core_Layout_Element|null $parent = null])
array getAllBlocks ()
string getArea ()
bool getDirectOutput ()
string getOutput ()
void removeOutputBlock ( $blockName)
void setBlock (string $name, Mage_Core_Model_Layout $block)
void unsetBlock (string $name)
Mage_Core_Model_Layout _generateAction (Varien_Simplexml_Element $node, Varien_Simplexml_Element $parent)
Mage_Core_Model_Layout _generateBlock (Varien_Simplexml_Element $node, Varien_Simplexml_Element $parent)
Mage_Core_Block_Abstract _getBlockInstance (string $block, [ $attributes = array()])
void _translateLayoutNode (Varien_Simplexml_Element $node,  &$args, array $args)
Variables
string $_area (line 63)

Layout area (f.e. admin, frontend)

  • access: protected
array $_blocks = array() (line 49)

Blocks registry

  • access: protected
boolean $_directOutput = false (line 77)

Flag to have blocks' output go directly to browser as oppose to return result

  • access: protected
array $_helpers = array() (line 70)

Helper blocks cache for this layout

  • access: protected
array $_output = array() (line 56)

Cache of block callbacks to output during rendering

  • access: protected
Mage_Core_Model_Layout_Update $_update (line 42)

Layout Update module

  • access: protected
Methods
static method findTranslationModuleName (line 601)

Lookup module name for translation from current specified layout node

Priorities: 1) "module" attribute in the element 2) "module" attribute in any ancestor element 3) layout handle name - first 1 or 2 parts (namespace is determined automatically)

  • access: public
static string findTranslationModuleName ( $node)
  • Varien_Simplexml_Element $node
Constructor __construct (line 84)

Class constructor

  • access: public
Mage_Core_Model_Layout __construct ([array $data = array()])
  • array $data
addBlock (line 444)

Add a block to registry, create new object if needed

  • access: public
Mage_Core_Block_Abstract addBlock ( $block, string $blockName, string|Mage_Core_Block_Abstract $blockClass)
addOutputBlock (line 506)

Add a block to output

  • access: public
void addOutputBlock (string $blockName, [string $method = 'toHtml'])
  • string $blockName
  • string $method
createBlock (line 408)

Block Factory

  • access: public
Mage_Core_Block_Abstract createBlock (string $type, [ $name = ''], [ $attributes = array()], string $blockName)
  • string $type
  • string $blockName
  • array $attributes
  • $name
generateBlocks (line 192)

Create layout blocks hierarchy from layout xml configuration

  • access: public
void generateBlocks ([Mage_Core_Layout_Element|null $parent = null])
  • Mage_Core_Layout_Element|null $parent
generateXml (line 151)

Loyout xml generation

  • access: public
Mage_Core_Model_Layout generateXml ()
getAllBlocks (line 480)

Retrieve all blocks from registry as array

  • access: public
array getAllBlocks ()
getArea (line 119)

Retrieve layout area

  • access: public
string getArea ()
getBlock (line 491)

Get block object by name

  • access: public
Mage_Core_Block_Abstract getBlock (string $name)
  • string $name
getBlockSingleton (line 556)

Enter description here...

  • access: public
Mage_Core_Helper_Abstract getBlockSingleton (string $type)
  • string $type
getDirectOutput (line 141)

Retrieve derect output flag

  • access: public
bool getDirectOutput ()
getMessagesBlock (line 541)

Retrieve messages block

  • access: public
Mage_Core_Block_Messages getMessagesBlock ()
getOutput (line 524)

Get all blocks marked for output

  • access: public
string getOutput ()
getUpdate (line 97)

Layout update instance

  • access: public
helper (line 581)

Retrieve helper object

  • access: public
Mage_Core_Helper_Abstract helper (string $name)
  • string $name
removeOutputBlock (line 513)
  • access: public
void removeOutputBlock ( $blockName)
  • $blockName
setArea (line 108)

Set layout area

  • access: public
Mage_Core_Model_Layout setArea (string $area)
  • string $area
setBlock (line 382)

Save block in blocks registry

  • access: public
void setBlock (string $name, Mage_Core_Model_Layout $block)
setDirectOutput (line 130)

Declaring layout direct output flag

  • access: public
Mage_Core_Model_Layout setDirectOutput (bool $flag)
  • bool $flag
unsetBlock (line 393)

Remove block from registry

  • access: public
void unsetBlock (string $name)
  • string $name
_generateAction (line 289)

Enter description here...

  • access: protected
Mage_Core_Model_Layout _generateAction (Varien_Simplexml_Element $node, Varien_Simplexml_Element $parent)
  • Varien_Simplexml_Element $node
  • Varien_Simplexml_Element $parent
_generateBlock (line 226)

Add block object to layout based on xml node data

  • access: protected
Mage_Core_Model_Layout _generateBlock (Varien_Simplexml_Element $node, Varien_Simplexml_Element $parent)
  • Varien_Simplexml_Element $node
  • Varien_Simplexml_Element $parent
_getBlockInstance (line 456)

Create block object instance based on block type

  • access: protected
Mage_Core_Block_Abstract _getBlockInstance (string $block, [ $attributes = array()])
  • string $block
  • array $attributes
_translateLayoutNode (line 361)

Translate layout node

  • access: protected
void _translateLayoutNode (Varien_Simplexml_Element $node,  &$args, array $args)
  • Varien_Simplexml_Element $node
  • array $args
  • &$args

Documentation generated on Fri, 11 Feb 2011 17:07:40 +0200 by phpDocumentor 1.4.3