function getComponentRefCode() { if ($this->mirror && ($mirrored_pager = $this->parent->findUpChild($this->mirror))) { return $mirrored_pager->getComponentRefCode(); } else { return parent::getComponentRefCode(); } }
function preParse() { if (!$this->hasAttribute('target') && !$this->hasAttribute('to')) { $this->raiseCompilerError('Required attribute not found', array('attribute' => 'target or to')); } if ($this->hasAttribute('target') && $this->hasAttribute('to')) { $this->raiseCompilerError('Both target and buffer attribute are not supported'); } $this->_fillToAttributeFromTargetAttribute(); return parent::preParse(); }
/** * Writes the compiled template constructor from the runtime component, * assigning the attributes found at compile time to the runtime component * via a serialized string */ function generateConstructor($code_writer) { parent::generateConstructor($code_writer); // Determine which attributes should not propigate to runtime $CompileTimeAttributes = $this->tag_info->getSuppressAttributes(); // Add the runat attribute to the list of attributes to filter out $CompileTimeAttributes[] = 'runat'; $CompileTimeAttributes[] = 'wact:id'; $code_writer->writePHP($this->getComponentRefCode() . '->setAttributes(unserialize('); $code_writer->writePHPLiteral(serialize($this->getAttributesAsArray($CompileTimeAttributes))); $code_writer->writePHP('));' . "\n"); }
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"); } }
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"); }
function generateTagContent($code_writer) { $code_writer->writePHP('if (' . $this->getComponentRefCode() . '->isVisible()) {'); parent::generateTagContent($code_writer); $code_writer->writePHP('}'); }