Exemple #1
0
 private function _findEmptyPluginTags(Pagemill_Tag $parent, $found = array())
 {
     foreach ($parent->children() as $child) {
         if (is_a($child, 'Pagemill_Tag_Plugin')) {
             if (!count($child->attributes())) {
                 $found[] = $child;
             }
             $found = $this->_findPlugin($child, $found);
         }
     }
     return $found;
 }
Exemple #2
0
 private function _attachToOptions(Pagemill_Tag $parent, Pagemill_TagPreprocessor_SelectValue $selectvalue)
 {
     foreach ($parent->children() as $child) {
         if (is_a($child, 'Pagemill_Tag')) {
             if ($child->name() == 'option') {
                 $child->attachPreprocess($selectvalue);
             } else {
                 if ($child->children()) {
                     $this->_attachToOptions($child, $selectvalue);
                 }
             }
         }
     }
 }
Exemple #3
0
 public function process(Pagemill_Tag $tag, Pagemill_Data $data, Pagemill_Stream $stream)
 {
     $attributes = array();
     $name = $this->_loopAttributes;
     $parts = explode(' ', $name, 2);
     $attributes['name'] = $parts[0];
     if (isset($parts[1])) {
         $attributes['as'] = $parts[1];
     }
     $loop = new Pagemill_Tag_Loop('loop', $attributes, null, $tag->doctype());
     $temptag = new Pagemill_Tag($tag->name(), $tag->attributes(), null, $tag->doctype());
     foreach ($tag->children() as $child) {
         $temptag->appendChild($child);
     }
     $loop->appendChild($temptag);
     $loop->process($data, $stream);
     foreach ($temptag->children() as $child) {
         $tag->appendChild($child);
     }
     return false;
 }