本文整理汇总了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'];
}
示例2:
function Tagger_Helper()
{
$this->EE =& get_instance();
parent::Channel();
$this->_params();
}
示例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;
}
示例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;
}