Mage_Core_Model_Layout_Element Class Reference

Inheritance diagram for Mage_Core_Model_Layout_Element:

Varien_Simplexml_Element

List of all members.

Public Member Functions

 prepare ($args)
 getBlockName ()
 prepareBlock ($args)
 prepareReference ($args)
 prepareAction ($args)
 prepareActionArgument ($args)


Detailed Description

Definition at line 28 of file Element.php.


Member Function Documentation

getBlockName (  ) 

Definition at line 68 of file Element.php.

00069     {
00070         $tagName = (string)$this->getName();
00071         if ('block'!==$tagName && 'reference'!==$tagName || empty($this['name'])) {
00072             return false;
00073         }
00074         return (string)$this['name'];
00075     }

prepare ( args  ) 

Definition at line 30 of file Element.php.

00031     {
00032         switch ($this->getName()) {
00033             case 'layoutUpdate':
00034                 break;
00035 
00036             case 'layout':
00037                 break;
00038 
00039             case 'update':
00040                 break;
00041 
00042             case 'remove':
00043                 break;
00044 
00045             case 'block':
00046                 $this->prepareBlock($args);
00047                 break;
00048 
00049             case 'reference':
00050                 $this->prepareReference($args);
00051                 break;
00052 
00053             case 'action':
00054                 $this->prepareAction($args);
00055                 break;
00056 
00057             default:
00058                 $this->prepareActionArgument($args);
00059                 break;
00060         }
00061         $children = $this->children();
00062         foreach ($this as $child) {
00063             $child->prepare($args);
00064         }
00065         return $this;
00066     }

prepareAction ( args  ) 

Definition at line 101 of file Element.php.

00102     {
00103         $parent = $this->getParent();
00104         $this->addAttribute('block', (string)$parent['name']);
00105 
00106         return $this;
00107     }

prepareActionArgument ( args  ) 

Definition at line 109 of file Element.php.

00110     {
00111         return $this;
00112     }

prepareBlock ( args  ) 

Definition at line 77 of file Element.php.

00078     {
00079         $type = (string)$this['type'];
00080         $name = (string)$this['name'];
00081 
00082         $className = (string)$this['class'];
00083         if (!$className) {
00084             $className = Mage::getConfig()->getBlockClassName($type);
00085             $this->addAttribute('class', $className);
00086         }
00087 
00088         $parent = $this->getParent();
00089         if (isset($parent['name']) && !isset($this['parent'])) {
00090             $this->addAttribute('parent', (string)$parent['name']);
00091         }
00092 
00093         return $this;
00094     }

prepareReference ( args  ) 

Definition at line 96 of file Element.php.

00097     {
00098         return $this;
00099     }


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

Generated on Sat Jul 4 17:23:57 2009 for Magento by  doxygen 1.5.8