Beispiel #1
0
 public function process()
 {
     if (!$this->isProcessed()) {
         $this->setAttribute('HREF', 'mailto:' . $this->getText());
     }
     return parent::process();
 }
Beispiel #2
0
 public function process()
 {
     if (!$this->isProcessed()) {
         $charsetMetas = $this->find('META', array('CHARSET' => true));
         if (!count($charsetMetas)) {
             $this->prependChild(new MetaElement(array('CHARSET' => 'utf-8')));
         }
     }
     return parent::process();
 }
Beispiel #3
0
 public function process()
 {
     if (!$this->isProcessed()) {
         if ($this->hasAttribute('REPEAT')) {
             $this->ignoreAttribute('REPEAT');
             $times = intval($this->getAttribute('REPEAT')) - 1;
             for ($i = 0; $i < $times; $i++) {
                 $this->getParent()->insertAfter($this, new self());
             }
         }
     }
     return parent::process();
 }
Beispiel #4
0
 public function process()
 {
     if (!$this->isProcessed()) {
         //Some things need to be done here, since the DOM is loaded completely at this point.
         //Pulling
         if ($this->hasAttribute('PULL')) {
             switch ($this->getAttribute('PULL')) {
                 case 'left':
                     $this->addClass('pull-left');
                     $this->getParent()->addClass('clearfix');
                     break;
                 case 'right':
                     $this->addClass('pull-right');
                     $this->getParent()->addClass('clearfix');
                     break;
                 case 'center':
                     $this->addClass('center-block');
                     break;
             }
         }
         $this->loadScriptsAndStyles();
     }
     return parent::process();
 }