function generateContents(&$code) { $code->writePHP($this->getComponentRefCode() . '->setSource(\'' . $this->getAttribute('source') .'\');'); $code->writePHP($this->getComponentRefCode() . '->process();'); parent :: generateContents($code); }
function generateContents(&$code) { $code->writePhp($this->getComponentRefCode() . '->setGroupName("' . $this->getAttribute('group_name') .'");'); $code->writePHP($this->getComponentRefCode() . '->process();'); parent :: generateContents($code); }
public function preGenerate($code) { parent::preGenerate($code); $code->writePhp($this->getComponentRefCode() . "->import(" . $this->parent->getDataspaceRefCode() . "->export());\n"); $code->writePhp($this->getComponentRefCode() . '->prepare();'."\n"); }
public function preGenerate($code) { $parent = $this->findParentByClass('pager_navigator_tag'); parent::preGenerate($code); $code->writePhp($this->getComponentRefCode() . '->set("number", ' . $parent->getComponentRefCode() . '->get_total_items());'); $code->writePhp($this->getComponentRefCode() . '->set("pages_count", ' . $parent->getComponentRefCode() . '->get_pages_count());'); $code->writePhp($this->getComponentRefCode() . '->set("more_than_one_page", ' . $parent->getComponentRefCode() . '->has_more_than_one_page());'); }
function generateContents(&$code) { parent :: generateContents($code); $code->writePhp($this->getComponentRefCode() . '->setClassPath("' . $this->getAttribute('class') .'");'); $code->writePhp($this->getComponentRefCode() . '->setTargets("' . $this->getAttribute('target') .'");'); $code->writePhp($this->getComponentRefCode() . '->process();'); }
function getComponentRefCode() { if ($this->mirror && ($mirrored_pager =& $this->parent->findChild($this->mirror))) { return $mirrored_pager->getComponentRefCode(); } else return parent :: getComponentRefCode(); }
public function generateContents($code) { $parent = $this->findParentByClass('pager_navigator_tag'); $code->writePhp('if (!' . $parent->getComponentRefCode() . '->is_first()) {'); parent :: generateContents($code); $code->writePhp('}'); }
public function generateContents($code) { if(isset($this->attributes['name']) && isset($this->attributes['type'])) { $code->writePhp( $this->getComponentRefCode() . '->get_param("' . $this->attributes['name'] . '","' . $this->attributes['type'] . '");'); } parent :: generateContents($code); }
public function postGenerate($code) { if (!$this->hide_for_current_page) { $parent = $this->findParentByClass('pager_navigator_tag'); $code->writePhp('if (!' . $parent->getComponentRefCode() . '->is_last()) {'); } parent::postGenerate($code); $code->writePhp('}'); }
public function generateContents($code) { $parent_form = $this->findParentByClass('form_tag'); $target = $this->parent->findChild($this->attributes['target']); $code->writePhp($target->getComponentRefCode() . '->register_dataset(' . $parent_form->getComponentRefCode() . '->get_error_dataset());'); parent :: generateContents($code); }
public function generateContents($code) { if (isset($this->attributes['target'])) { $target = 'target=' . $this->attributes['target']; } else { $target = ''; } $code->writePhp('echo "<a ' . $target . ' href=" . ' . $this->getComponentRefCode() . '->get_current_template_source_link() . ">"'); parent::generateContents($code); $code->writePhp('echo "</a>"'); }
public function generateContents($code) { $parent = $this->findParentByClass('pager_navigator_tag'); $code->writePhp('if (!' . $parent->getComponentRefCode() . '->is_current_page()) {'); $code->writePhp($this->getComponentRefCode() . '->set("href", ' . $parent->getComponentRefCode() . '->get_current_page_uri());'); $code->writePhp($this->getComponentRefCode() . '->set("number", ' . $parent->getComponentRefCode() . '->get_page_number());'); parent :: generateContents($code); $code->writePhp('}'); }
public function generateContents($code) { $ref = $this->getComponentRefCode(); if (isset($this->attributes['separator'])) { $code->writePhp("{$ref}->setTitleSeparator(\"" . $this->attributes['separator'] . "\");\n"); } if (isset($this->attributes['offset_path'])) { $code->writePhp($this->getComponentRefCode() . '->set_offset_path("' . $this->attributes['offset_path'] . '");'); } $ref = $this->getComponentRefCode(); $code->writePhp("echo {$ref}->get_title();\n"); parent::generateContents($code); }
public function generateContents($code) { parent :: generateContents($code); $code->writePhp($this->getComponentRefCode() . '->set_datasource_path("' . $this->attributes['datasource_path'] .'");'); if(isset($this->attributes['navigator'])) { $code->writePhp($this->getComponentRefCode() . '->setup_navigator("' . $this->attributes['navigator'] .'");'); } $code->writePhp($this->getComponentRefCode() . '->setup_targets("' . $this->attributes['target'] .'");'); }
public function generateContents($code) { $child_list = $this->findImmediateChildByClass('grid_list_tag'); if (isset($this->attributes['request_path_attribute'])) { $code->writePhp($this->getComponentRefCode() . '->set_request_path("' . $this->attributes['request_path_attribute'] . '");'); } if (isset($this->attributes['offset_path'])) { $code->writePhp($this->getComponentRefCode() . '->set_offset_path("' . $this->attributes['offset_path'] . '");'); } if ($child_list) { $code->writePhp($child_list->getComponentRefCode() . '->register_dataset(' . $this->getComponentRefCode() . '->get_breadcrumbs_dataset());'); } parent::generateContents($code); }
public function generateContents($code) { $v = '$' . $code->getTempVariable(); $code->writePhp($this->getComponentRefCode() . '->prepare();'); $code->writePhp('if (!(' . $v . ' = ' . $this->getComponentRefCode() . '->get())) {'); $code->writePhp('ob_start();'); parent::generateContents($code); $code->writePhp($this->getComponentRefCode() . '->write(ob_get_contents());ob_end_flush();'); $code->writePhp('}'); $code->writePhp('else echo ' . $v . ';'); }
function generateContents(&$code) { parent :: generateContents($code); $code->writePhp($this->getComponentRefCode() . '->setClassPath("' . $this->getAttribute('class') .'");'); $navigator = $this->getAttribute('navigator'); if(!empty($navigator)) { $code->writePhp($this->getComponentRefCode() . '->setNavigator("' . $navigator .'");'); } $code->writePhp($this->getComponentRefCode() . '->setTargets("' . $this->getAttribute('target') .'");'); $code->writePhp($this->getComponentRefCode() . '->process();'); }
public function getComponentRefCode() { if (isset($this->attributes['mirror_of'])) { if($mirrored_pager = $this->parent->findChild($this->attributes['mirror_of'])) return $mirrored_pager->getComponentRefCode(); else throw new WactException('mirrowed component for pager not found', array('tag' => $this->tag, 'mirror_of' => $this->attributes['mirror_of'], 'file' => $this->source_file, 'line' => $this->starting_line_no)); } else return parent :: getComponentRefCode(); }
public function postGenerate($code) { $code->writePhp('} else {'); if ($default = $this->findImmediateChildByClass('grid_default_tag')) $default->generateNow($code); $code->writePhp('}'); if ($this->has_form) { $code->writeHtml('</form>'); } parent :: postGenerate($code); }
public function generateContents($code) { if(isset($this->attributes['hash_id'])) { if(isset($this->attributes['locale_type'])) { $code->writePhp( $this->getComponentRefCode() . '->set_locale_type("' . $this->attributes['locale_type'] . '");'); } if(isset($this->attributes['type'])) { $code->writePhp( $this->getComponentRefCode() . '->set_date_type("' . $this->attributes['type'] . '");'); } if(!isset($this->attributes['date_format'])) $code->writePhp( $this->getComponentRefCode() . '->set_date(' . $this->getDataspaceRefCode() . '->get("' . $this->attributes['hash_id'] . '"), DATE_SHORT_FORMAT_ISO);'); else $code->writePhp( $this->getComponentRefCode() . '->set_date(' . $this->getDataspaceRefCode() . '->get("' . $this->attributes['hash_id'] . '"), "' . $this->attributes['date_format'] . '");'); if(isset($this->attributes['locale_format'])) { $code->writePhp( $this->getComponentRefCode() . '->set_locale_format_type("' . $this->attributes['locale_format'] . '");'); } elseif(isset($this->attributes['format'])) { $code->writePhp( $this->getComponentRefCode() . '->set_format_string("' . $this->attributes['format'] . '");'); } $code->writePhp( $this->getComponentRefCode() . '->format();'); } parent :: generateContents($code); }
public function preGenerate($code) { parent :: preGenerate($code); $actions_array = '$' . $code->getTempVariable(); $node_id = '$' . $code->getTempVariable(); $node = '$' . $code->getTempVariable(); $code->writePhp("{$actions_array} = ". $this->parent->getDataspaceRefCode() . '->get("actions");'."\n"); $code->writePhp("{$node_id} = " . $this->parent->getDataspaceRefCode() . '->get("node_id");'. "\n"); $code->writePhp("if(!{$node_id}){ {$node} = Limb :: toolkit()->getFetcher()->mapRequestToNode(Limb :: toolkit()->getRequest()); {$node_id} = {$node}['id'];}\n"); $code->writePhp($this->getComponentRefCode() . "->setActions({$actions_array});\n"); $code->writePhp($this->getComponentRefCode() . "->setNodeId({$node_id});\n"); $code->writePhp($this->getComponentRefCode() . '->prepare();'."\n"); $code->writePhp('if (' . $this->getComponentRefCode() . '->next()) {'); }
public function generateContents($code) { $code->writePhp($this->getComponentRefCode() . '->fetch_by_path("' . $this->attributes['path'] . '");'); parent :: generateContents($code); }
function generateContents(&$code) { $code->writePHP($this->getComponentRefCode() . '->process();'); parent :: generateContents($code); }
public function generateContents($code) { $code->writePhp('if !' . $this->getComponentRefCode() . '->is_user_in_groups(' . $this->attributes['groups'] . '){'); parent::generateContents($code); $code->writePhp('}'); }
public function postGenerate($code) { $code->writePhp('}'); parent::postGenerate($code); }
/** * Writes the compiled template constructor from the runtime component, * assigning the attributes found at compile time to the runtime component * via a serialized string */ public function generateConstructor($code) { parent::generateConstructor($code); $code->writePhp($this->getComponentRefCode() . '->attributes = ' . var_export($this->attributes, true) . ';'); }
public function generateContents($code) { $code->writePhp('if (' . $this->getComponentRefCode() . '->poll_exists()) {'); parent::generateContents($code); $code->writePhp('}'); }
public function preGenerate($code) { parent::preGenerate($code); $code->writePhp($this->getComponentRefCode() . '->prepare();'); }
public function generateContents($code) { $ref = $this->getComponentRefCode(); $code->writePhp("{$ref}->load_metadata();\n"); parent::generateContents($code); }
public function generateContents($code) { $code->writePhp($this->getComponentRefCode() . '->fetch_requested();'); parent :: generateContents($code); }