当前位置: 首页>>代码示例>>PHP>>正文


PHP server_component_tag::pre_generate方法代码示例

本文整理汇总了PHP中server_component_tag::pre_generate方法的典型用法代码示例。如果您正苦于以下问题:PHP server_component_tag::pre_generate方法的具体用法?PHP server_component_tag::pre_generate怎么用?PHP server_component_tag::pre_generate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在server_component_tag的用法示例。


在下文中一共展示了server_component_tag::pre_generate方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

	/**
	* 
	* @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();');
	} 
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:13,代码来源:outputcache.tag.php

示例2:

 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());');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:7,代码来源:total.tag.php

示例3:

  /**
  *
  * @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()){');
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:14,代码来源:dataspace.tag.php

示例4:

 /**
  *
  * @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()){');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:15,代码来源:list.tag.php

示例5:

 /**
 * 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('>');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:21,代码来源:server_tag_component_tag.class.php

示例6:

 /**
  *
  * @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('}');
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:17,代码来源:last.tag.php

示例7:

 /**
  * 
  * @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()) {');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:17,代码来源:errors.tag.php

示例8:

 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()) {');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:14,代码来源:actions.tag.php

示例9:

 function pre_generate(&$code)
 {
     parent::pre_generate($code);
     $code->write_php($this->get_component_ref_code() . '->prepare();');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:5,代码来源:poll.tag.php

示例10:

 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");
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:6,代码来源:order.tag.php

示例11:

	/**
	* 
	* @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()) {');
	} 
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:11,代码来源:block.tag.php

示例12:

 /**
  * 
  * @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()){');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:12,代码来源:list.tag.php


注:本文中的server_component_tag::pre_generate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。