예제 #1
0
파일: Socket.php 프로젝트: ssrsfs/blg
 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;
 }
예제 #2
0
파일: Selected.php 프로젝트: ssrsfs/blg
 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);
                 }
             }
         }
     }
 }
예제 #3
0
파일: Loop.php 프로젝트: ssrsfs/blg
 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;
 }