Пример #1
0
 /**
  * Processes an object that is created during parsing template.
  * This method adds TMetaTag components into the {@link getMetaTags MetaTags}
  * collection of the head control.
  * @param string|TComponent text string or component parsed and instantiated in template
  * @see createdOnTemplate
  */
 public function addParsedObject($object)
 {
     if ($object instanceof TMetaTag) {
         $this->getMetaTags()->add($object);
     } else {
         parent::addParsedObject($object);
     }
 }
Пример #2
0
 /**
  * Adds the object parsed in template as a body of the component.
  * @param TComponent|string the newly parsed object
  * @param TComponent the template owner
  */
 public function addParsedObject($object, $context)
 {
     if ($object instanceof TControl) {
         $this->addChild($object);
         $this->addBody($object);
     } else {
         parent::addParsedObject($object, $context);
     }
 }
Пример #3
0
 /**
  * Processes an object that is created during parsing template.
  * This method overrides the parent implementation by removing
  * all contents enclosed in the template tag.
  * @param string|TComponent text string or component parsed and instantiated in template
  * @see createdOnTemplate
  */
 public function addParsedObject($object)
 {
     if ($this->_creatingChildren) {
         parent::addParsedObject($object);
     }
 }
Пример #4
0
 public function addParsedObject($object)
 {
     if ($object instanceof SimpleMenuItem) {
         parent::addParsedObject($object);
     }
 }