Exemplo n.º 1
0
 function generate_contents(&$code)
 {
     if (isset($this->attributes['name']) && isset($this->attributes['type'])) {
         $code->write_php($this->get_component_ref_code() . '->get_param("' . $this->attributes['name'] . '","' . $this->attributes['type'] . '");');
     }
     parent::generate_contents($code);
 }
Exemplo n.º 2
0
 /**
  * 
  * @param code $ _writer
  * @return void 
  * @access protected 
  */
 function generate_contents(&$code)
 {
     $parent_form =& $this->find_parent_by_class('form_tag');
     $target =& $this->parent->find_child($this->attributes['target']);
     $code->write_php($target->get_component_ref_code() . '->register_dataset(' . $parent_form->get_component_ref_code() . '->get_error_dataset());');
     parent::generate_contents($code);
 }
 function generate_contents(&$code)
 {
     if (isset($this->attributes['hash_id']) && isset($this->attributes['target'])) {
         $code->write_php($this->get_component_ref_code() . '->make_transfer(\'' . $this->attributes['hash_id'] . '\', \'' . $this->attributes['target'] . '\');');
     }
     parent::generate_contents($code);
 }
Exemplo n.º 4
0
 function generate_contents(&$code)
 {
     $parent =& $this->find_parent_by_class('pager_navigator_tag');
     $code->write_php('if (!' . $parent->get_component_ref_code() . '->is_last()) {');
     parent::generate_contents($code);
     $code->write_php('}');
 }
Exemplo n.º 5
0
 function generate_contents(&$code)
 {
     parent::generate_contents($code);
     if (isset($this->attributes['navigator'])) {
         if ($navigator =& $this->parent->find_child($this->attributes['navigator'])) {
             $limit = $code->get_temp_variable();
             $code->write_php('$' . $limit . '= ' . $navigator->get_component_ref_code() . '->get_items_per_page();');
             $code->write_php($this->get_component_ref_code() . '->set_parameter("limit", $' . $limit . ');');
             $code->write_php('if(isset($_GET["page_' . $navigator->get_server_id() . '"])){');
             $code->write_php($this->get_component_ref_code() . '->set_parameter("offset", ($_GET["page_' . $navigator->get_server_id() . '"]-1)*$' . $limit . ');');
             $code->write_php('}');
         }
     }
     $targets = explode(',', $this->attributes['target']);
     foreach ($targets as $target) {
         if ($target_component =& $this->parent->find_child(trim($target))) {
             $code->write_php($target_component->get_component_ref_code() . '->register_dataset(' . $this->get_component_ref_code() . '->get_dataset());');
         } else {
             debug::write_error('component target not found', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('target' => $target));
         }
     }
     if (isset($this->attributes['navigator']) && $navigator) {
         $code->write_php($navigator->get_component_ref_code() . '->set_total_items(' . $this->get_component_ref_code() . '->get_total_count());');
     }
 }
Exemplo n.º 6
0
  function generate_contents(&$code)
  {
    $ref = $this->get_component_ref_code();
    $code->write_php("{$ref}->load_metadata();\n");

    parent :: generate_contents($code);

  }
Exemplo n.º 7
0
 /**
  *
  * @param code $ _writer
  * @return void
  * @access protected
  */
 function generate_contents(&$code)
 {
     $parent =& $this->find_parent_by_class('pager_navigator_tag');
     $code->write_php('if (!' . $parent->get_component_ref_code() . '->is_current_page()) {');
     $code->write_php($this->get_component_ref_code() . '->set("href", ' . $parent->get_component_ref_code() . '->get_current_page_uri());');
     $code->write_php($this->get_component_ref_code() . '->set("number", ' . $parent->get_component_ref_code() . '->get_page_number());');
     parent::generate_contents($code);
     $code->write_php('}');
 }
Exemplo n.º 8
0
 function generate_contents(&$code)
 {
     $list_child =& $this->find_immediate_child_by_class('fetch_list_tag');
     if ($list_child) {
         $code->write_php($list_child->get_component_ref_code() . '->set_path($_SERVER["PHP_SELF"]);');
     }
     $code->write_php($this->get_component_ref_code() . '->fetch_mapped_by_url();');
     server_component_tag::generate_contents($code);
 }
Exemplo n.º 9
0
 function generate_contents(&$code)
 {
     $ref = $this->get_component_ref_code();
     if (isset($this->attributes['separator'])) {
         $code->write_php("{$ref}->set_title_separator(\"" . $this->attributes['separator'] . "\");\n");
     }
     $ref = $this->get_component_ref_code();
     $code->write_php("echo {$ref}->get_title();\n");
     parent::generate_contents($code);
 }
 function generate_contents(&$code)
 {
     if (isset($this->attributes['target'])) {
         $target = 'target=' . $this->attributes['target'];
     } else {
         $target = '';
     }
     $code->write_php('echo "<a ' . $target . ' href=" . ' . $this->get_component_ref_code() . '->get_current_template_source_link() . ">"');
     parent::generate_contents($code);
     $code->write_php('echo "</a>"');
 }
Exemplo n.º 11
0
 function generate_contents(&$code)
 {
     $v = '$' . $code->get_temp_variable();
     $code->write_php($this->get_component_ref_code() . '->prepare();');
     $code->write_php('if (!(' . $v . ' = ' . $this->get_component_ref_code() . '->get())) {');
     $code->write_php('ob_start();');
     parent::generate_contents($code);
     $code->write_php($this->get_component_ref_code() . '->write(ob_get_contents());ob_end_flush();');
     $code->write_php('}');
     $code->write_php('else echo ' . $v . ';');
 }
Exemplo n.º 12
0
 function generate_contents(&$code)
 {
     $child_list =& $this->find_immediate_child_by_class('list_list_tag');
     if (isset($this->attributes['offset_path'])) {
         $code->write_php($this->get_component_ref_code() . '->set_offset_path("' . $this->attributes['offset_path'] . '");');
     }
     if ($child_list) {
         $code->write_php($child_list->get_component_ref_code() . '->register_dataset(' . $this->get_component_ref_code() . '->get_breadcrumbs_dataset());');
     }
     parent::generate_contents($code);
 }
Exemplo n.º 13
0
 function generate_contents(&$code)
 {
     parent::generate_contents($code);
     if (isset($this->attributes['navigator'])) {
         $code->write_php($this->get_component_ref_code() . '->set("navigator_id", "' . $this->attributes['navigator'] . '");');
         $code->write_php($this->get_component_ref_code() . '->setup_navigator();');
     }
     $code->write_php($this->get_component_ref_code() . '->set("target", "' . $this->attributes['target'] . '");');
     $code->write_php($this->get_component_ref_code() . '->setup_target();');
     if (isset($this->attributes['navigator'])) {
         $code->write_php($this->get_component_ref_code() . '->fill_navigator();');
     }
 }
  function generate_contents(&$code)
  {
    $ref = $this->get_component_ref_code();

    if(isset($this->attributes['resolve_by'])
        && $this->attributes['resolve_by'] == 'path')
      $this->_set_path_resolver($code);
    else
      $this->_set_identifier_resolver($code);

    $code->write_php("{$ref}->get_string();\n");

    parent :: generate_contents($code);
  }
Exemplo n.º 15
0
  function generate_contents(&$code)
  {
    $ref = $this->get_component_ref_code();

    if(isset($this->attributes['identifier']))
      $code->write_php("{$ref}->set(\"identifier\", \"". $this->attributes['identifier'] ."\");\n");
    else
      $code->write_php("{$ref}->set(\"identifier\", " . $this->parent->get_dataspace_ref_code() ."->get('icon'));\n");

    if(isset($this->attributes['variation']))
      $code->write_php("{$ref}->set(\"variation\", \"". $this->attributes['variation'] ."\");\n");

    $code->write_php("{$ref}->get_icon_path();\n");

    parent :: generate_contents($code);
  }
Exemplo n.º 16
0
 function generate_contents(&$code)
 {
     if (isset($this->attributes['hash_id'])) {
         if (isset($this->attributes['locale_type'])) {
             $code->write_php($this->get_component_ref_code() . '->set_locale_type("' . $this->attributes['locale_type'] . '");');
         }
         if (isset($this->attributes['type'])) {
             $code->write_php($this->get_component_ref_code() . '->set_date_type("' . $this->attributes['type'] . '");');
         }
         $code->write_php($this->get_component_ref_code() . '->set_date(' . $this->get_dataspace_ref_code() . '->get("' . $this->attributes['hash_id'] . '"));');
         if (isset($this->attributes['locale_format'])) {
             $code->write_php($this->get_component_ref_code() . '->set_locale_format_type("' . $this->attributes['locale_format'] . '");');
         } elseif (isset($this->attributes['format'])) {
             $code->write_php($this->get_component_ref_code() . '->set_format_string("' . $this->attributes['format'] . '");');
         }
         $code->write_php($this->get_component_ref_code() . '->format();');
     }
     parent::generate_contents($code);
 }
Exemplo n.º 17
0
 function generate_contents(&$code)
 {
     if (isset($this->attributes['navigator'])) {
         if ($navigator =& $this->parent->find_child($this->attributes['navigator'])) {
             $limit = $code->get_temp_variable();
             $code->write_php('$' . $limit . '= ' . $navigator->get_component_ref_code() . '->get_items_per_page();');
             $code->write_php($this->get_component_ref_code() . '->set_parameter("limit", $' . $limit . ');');
             $code->write_php('if(isset($_GET["page_' . $navigator->get_server_id() . '"])){');
             $code->write_php($this->get_component_ref_code() . '->set_parameter("offset", ($_GET["page_' . $navigator->get_server_id() . '"]-1)*$' . $limit . ');');
             $code->write_php('}');
         }
     }
     $target =& $this->parent->find_child($this->attributes['target']);
     parent::generate_contents($code);
     if ($target) {
         $code->write_php($target->get_component_ref_code() . '->register_dataset(' . $this->get_component_ref_code() . '->get_dataset());');
     }
     if (isset($this->attributes['navigator']) && $navigator) {
         $code->write_php($navigator->get_component_ref_code() . '->set_total_items(' . $this->get_component_ref_code() . '->get_total_count());');
     }
 }
Exemplo n.º 18
0
  function generate_contents(&$code)
  {
    if(isset($this->attributes['path']))
    {
      $code->write_php($this->get_component_ref_code() . '->fetch("' . $this->attributes['path'] . '");');
    }
    else if(isset($this->attributes['hash_id']))
    {
      $path_tmp = '$' . $code->get_temp_variable();
      $uri_tmp = '$' . $code->get_temp_variable();

      $code->write_php(
        "{$path_tmp} = " . $this->parent->get_dataspace_ref_code() . '->get("' . $this->attributes['hash_id'] . '");');

      $code->register_include(LIMB_DIR . "/core/lib/http/uri.class.php");

      $code->write_php($uri_tmp . " = new uri(" . $path_tmp . ");" .
                       $this->get_component_ref_code() . "->fetch(" . $uri_tmp . "->get_path());");
    }

    parent :: generate_contents($code);
  }
Exemplo n.º 19
0
	function generate_contents(&$code)
	{		
		$code->write_php($this->get_component_ref_code() . '->fetch("' . $this->attributes['path'] . '");');
		
		parent :: generate_contents($code);
	}
Exemplo n.º 20
0
 /**
  * 
  * @param code $ _writer
  * @return void 
  * @access protected 
  */
 function generate_contents(&$code)
 {
     $code->write_php('do { ');
     parent::generate_contents($code);
     $code->write_php('} while (' . $this->get_dataspace_ref_code() . '->next());');
 }
Exemplo n.º 21
0
	function generate_contents(&$code)
	{		
		$code->write_php('if (' . $this->get_component_ref_code() . '->poll_exists()) {');
		parent :: generate_contents($code);
		$code->write_php('}');
	}