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


PHP Channel::Channel方法代码示例

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


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

示例1: Structure

 function Structure()
 {
     parent::Channel();
     $this->EE =& get_instance();
     $this->sql = new Sql_structure();
     $adapter = new Structure_Nestedset_Adapter_Ee('exp_structure', 'lft', 'rgt', 'entry_id');
     $this->nset = new Structure_Nestedset($adapter);
     $this->cat_trigger = $this->EE->config->item('reserved_category_word');
     // -------------------------------------------
     //  Prepare Cache
     // -------------------------------------------
     if (!isset($this->EE->session->cache['structure'])) {
         $this->EE->session->cache['structure'] = array();
     }
     $this->cache =& $this->EE->session->cache['structure'];
 }
开发者ID:kentonquatman,项目名称:iofa,代码行数:16,代码来源:mod.structure.php

示例2:

 function Tagger_Helper()
 {
     $this->EE =& get_instance();
     parent::Channel();
     $this->_params();
 }
开发者ID:robertbanh,项目名称:DevDemon-Helper,代码行数:6,代码来源:pi.tagger_helper.php

示例3: Category_entry_loop

 public function Category_entry_loop()
 {
     parent::Channel();
     $output = '';
     $cat_url = $this->EE->TMPL->fetch_param('cat_url', '');
     if (!empty($cat_url)) {
         $sql = $this->EE->db->query("\n                SELECT \n                    *\n                FROM " . $this->EE->db->dbprefix('categories') . "\n                WHERE \n                    cat_url_title = '" . $this->EE->db->escape_str($cat_url) . "'\n            ");
         $re = $sql->result_array();
         $re = current($re);
         if (isset($re['cat_id'])) {
             $cat_id = $re['cat_id'];
             $this->EE->TMPL->tagparams['category'] = $cat_id;
             $this->EE->TMPL->tagparams['channel'] = $this->EE->TMPL->fetch_param('channel', '');
             $this->EE->TMPL->tagparams['limit'] = $this->EE->TMPL->fetch_param('limit', '');
             $this->EE->TMPL->tagparams['orderby'] = $this->EE->TMPL->fetch_param('orderby', '');
             $this->EE->TMPL->tagparams['sort'] = $this->EE->TMPL->fetch_param('sort', '');
             $this->EE->TMPL->tagparams['dynamic'] = $this->EE->TMPL->fetch_param('dynamic', '');
             $this->EE->TMPL->tagparams['disable'] = $this->EE->TMPL->fetch_param('disable', '');
             $this->EE->TMPL->tagparams['cache'] = $this->EE->TMPL->fetch_param('cache', '');
             $this->EE->TMPL->tagparams['refresh'] = $this->EE->TMPL->fetch_param('refresh', '');
             $this->EE->TMPL->tagparams['paginate'] = $this->EE->TMPL->fetch_param('paginate', '');
             $this->return_data = parent::entries();
         }
     }
     return $this->return_data;
 }
开发者ID:robertbanh,项目名称:taechogroup_ee_module,代码行数:26,代码来源:mod.taechogroup.php

示例4: favorites

    public function favorites()
    {
        parent::Channel();
        
        // fetch current logged in user
        $current_user = $this->EE->session->userdata('member_id');
        if (empty($current_user)) return $this->EE->TMPL->no_results();

        // fetch all favorites by the user
        $re = $this->EE->taechogroup_model->get_entry_ids_by_member_id($current_user);
        if (empty($re)) return $this->EE->TMPL->no_results();

        $entry_ids = array();
        foreach ($re as $r)
        {
            $entry_ids[] = $r['entry_id'];
        }
        
        $this->EE->TMPL->tagparams['entry_id'] = implode('|', $entry_ids);
       
        $this->return_data = parent::entries();

        return $this->return_data;
    }
开发者ID:robertbanh,项目名称:EE-sample-module,代码行数:24,代码来源:mod.taechogroup.php


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