public function preGenerate($code) { parent::preGenerate($code); $code->writePhp($this->getComponentRefCode() . "->import(" . $this->parent->getDataspaceRefCode() . "->export());\n"); $code->writePhp($this->getComponentRefCode() . '->prepare();'."\n"); }
/** * Calls the parent pre_generate() method then writes the XML tag name * plus a PHP string which renders the attributes from the runtime * component. */ public function preGenerate($code) { parent::preGenerate($code); $code->writeHtml('<' . $this->getRenderedTag()); $code->writePhp($this->getComponentRefCode() . '->render_attributes();'); $this->generateExtraAttributes($code); $code->writeHtml('>'); }
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());'); }
public function preGenerate($code) { $code->writePhp($this->getComponentRefCode() . '->prepare();'); parent :: preGenerate($code); if ($this->has_form) { $code->writeHtml('<form name="grid_form" id="grid_form_'. $this->getServerId() .'" method="post">'); } $code->writePhp('if (' . $this->getDataspaceRefCode() . '->get_total_row_count()){'); }
public function preGenerate($code) { $this->hide_for_current_page = array_key_exists('hide_for_current_page', $this->attributes); $parent = $this->findParentByClass('pager_navigator_tag'); $code->writePhp('if (!' . $parent->getComponentRefCode() . '->is_first()) {'); parent::preGenerate($code); $code->writePhp($this->getComponentRefCode() . '->set("href", ' . $parent->getComponentRefCode() . '->get_first_page_uri());'); if (!$this->hide_for_current_page) { $code->writePhp('}'); } }
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 preGenerate($code) { parent::preGenerate($code); $code->writePhp('if (' . $this->getComponentRefCode() . '->is_visible()) {'); }
public function preGenerate($code) { parent::preGenerate($code); $code->writePhp($this->getComponentRefCode() . '->prepare();'); }
public function preGenerate($code) { parent :: preGenerate($code); $code->writePhp('if (!' . $this->getDataspaceRefCode() . '->is_empty()){'); }