Ejemplo n.º 1
0
 function generateTagContent($code_writer)
 {
     if ($this->hasAttribute('from')) {
         $code_writer->writePHP($this->getComponentRefCode() . '->registerDataset(');
         $this->attributeNodes['from']->generateExpression($code_writer);
         $code_writer->writePHP(');' . "\n");
     }
     $code_writer->writePHP($this->getComponentRefCode() . '->rewind();' . "\n");
     $code_writer->writePHP('if (' . $this->getComponentRefCode() . '->valid()) {' . "\n");
     parent::generateTagContent($code_writer);
     $code_writer->writePHP('}' . "\n");
     $emptyChild = $this->findImmediateChildByClass('WactListDefaultTag');
     if ($emptyChild) {
         $code_writer->writePHP(' else { ' . "\n");
         $emptyChild->generateNow($code_writer);
         $code_writer->writePHP('}' . "\n");
     }
 }
Ejemplo n.º 2
0
 function generateTagContent($code)
 {
     $step_var = $code->getTempVarRef();
     $code->writePHP($step_var . ' = ');
     $this->generateStepAttributeValue($code);
     $code->writePhp(";\n");
     $code->writePhp($this->getComponentRefCode($code) . '->setStep(' . $step_var . ");\n");
     $ListList = $this->findParentByClass('WactListListTag');
     $code->writePhp($this->getComponentRefCode($code) . '->next();' . "\n");
     $code->writePhp('if ( ' . $this->getComponentRefCode($code) . '->shouldDisplay()){' . "\n");
     $code->writePhp($this->getComponentRefCode($code) . '->reset();' . "\n");
     $separators = $this->parent->findChildrenByClass('WactListSeparatorTag');
     if (array($separators) && count($separators)) {
         foreach ($separators as $separator) {
             $code->writePhp('if (');
             $separator->generateStepAttributeValue($code);
             $code->writePhp(' < ' . $step_var . ') ');
             $code->writePhp($separator->getComponentRefCode($code) . "->skipNext();\n");
         }
     }
     parent::generateTagContent($code);
     $code->writePhp('}' . "\n");
 }
Ejemplo n.º 3
0
 function generateTagContent($code_writer)
 {
     $code_writer->writePHP('if (' . $this->getComponentRefCode() . '->isVisible()) {');
     parent::generateTagContent($code_writer);
     $code_writer->writePHP('}');
 }