/** * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { $this->content_ref = get_new_server_id(); parent::pre_generate($code); $code->write_php('if (!' . $this->get_component_ref_code() . '->is_cached()) {'); $code->write_php('ob_start();'); }
function pre_generate(&$code) { $parent =& $this->find_parent_by_class('pager_navigator_tag'); parent::pre_generate($code); $code->write_php($this->get_component_ref_code() . '->set("number", ' . $parent->get_component_ref_code() . '->get_total_items());'); $code->write_php($this->get_component_ref_code() . '->set("more_than_one_page", ' . $parent->get_component_ref_code() . '->has_more_than_one_page());'); }
/** * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { $code->write_php($this->get_component_ref_code() . '->prepare();'); parent :: pre_generate($code); $code->write_php('if (!' . $this->get_dataspace_ref_code() . '->is_empty()){'); }
/** * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { $code->write_php($this->get_component_ref_code() . '->prepare();'); parent::pre_generate($code); if ($this->has_form) { $code->write_html('<form name="grid_form" id="grid_form_' . $this->get_server_id() . '" method="post">'); } $code->write_php('if (' . $this->get_dataspace_ref_code() . '->get_total_row_count()){'); }
/** * Calls the parent pre_generate() method then writes the XML tag name * plus a PHP string which renders the attributes from the runtime * component. * * @param code $ _writer * @return void * @access protected * @todo compiler needs to detect XML to allow for empty tags */ function pre_generate(&$code) { parent::pre_generate($code); $code->write_html('<' . $this->get_rendered_tag()); $code->write_php($this->get_component_ref_code() . '->render_attributes();'); // if this is an XML based document and this component is self closing, // (a condition we cannot yet detect.) // $code->write_html('/'); $this->generate_extra_attributes($code); $code->write_html('>'); }
/** * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { $this->hide_for_current_page = array_key_exists('hide_for_current_page', $this->attributes); $parent =& $this->find_parent_by_class('pager_navigator_tag'); $code->write_php('if (!' . $parent->get_component_ref_code() . '->is_last()) {'); parent::pre_generate($code); $code->write_php($this->get_component_ref_code() . '->set("href", ' . $parent->get_component_ref_code() . '->get_last_page_uri());'); if (!$this->hide_for_current_page) { $code->write_php('}'); } }
/** * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { parent::pre_generate($code); $parent_form =& $this->find_parent_by_class('form_tag'); $code->write_php($this->get_component_ref_code() . '->register_dataset(' . $parent_form->get_component_ref_code() . '->get_error_dataset());'); if (isset($this->attributes['for'])) { $code->write_php($this->get_dataspace_ref_code() . '->restrict_fields(array(\'' . $this->attributes['for'] . '\'));'); } $code->write_php($this->get_component_ref_code() . '->prepare();'); $code->write_php('if (' . $this->get_dataspace_ref_code() . '->next()) {'); }
function pre_generate(&$code) { parent::pre_generate($code); $actions_array = '$' . $code->get_temp_variable(); $node_id = '$' . $code->get_temp_variable(); $node = '$' . $code->get_temp_variable(); $code->write_php("{$actions_array} = " . $this->parent->get_dataspace_ref_code() . '->get("actions");' . "\n"); $code->write_php("{$node_id} = " . $this->parent->get_dataspace_ref_code() . '->get("node_id");' . "\n"); $code->write_php("if(!{$node_id}){ \r\n\t\t\t{$node} =& map_url_to_node(); {$node_id} = {$node}['id'];}\n"); $code->write_php($this->get_component_ref_code() . "->set_actions({$actions_array});\n"); $code->write_php($this->get_component_ref_code() . "->set_node_id({$node_id});\n"); $code->write_php($this->get_component_ref_code() . '->prepare();' . "\n"); $code->write_php('if (' . $this->get_component_ref_code() . '->next()) {'); }
function pre_generate(&$code) { parent::pre_generate($code); $code->write_php($this->get_component_ref_code() . '->prepare();'); }
function pre_generate(&$code) { parent::pre_generate($code); $code->write_php($this->get_component_ref_code() . "->import(" . $this->parent->get_dataspace_ref_code() . "->export());\n"); $code->write_php($this->get_component_ref_code() . '->prepare();' . "\n"); }
/** * * @param code_writer $ * @return void * @access protected */ function pre_generate(&$code) { parent::pre_generate($code); $code->write_php('if (' . $this->get_component_ref_code() . '->is_visible()) {'); }
/** * * @param code $ _writer * @return void * @access protected */ function pre_generate(&$code) { $code->write_php($this->get_component_ref_code() . '->prepare();'); parent::pre_generate($code); $code->write_php('if (' . $this->get_dataspace_ref_code() . '->get_total_row_count()){'); }