本文整理汇总了PHP中Question::load_many方法的典型用法代码示例。如果您正苦于以下问题:PHP Question::load_many方法的具体用法?PHP Question::load_many怎么用?PHP Question::load_many使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Question
的用法示例。
在下文中一共展示了Question::load_many方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Question
function get_links()
{
$question = new Question();
$param = array('cnt' => TRUE);
$this->Paging["count"] = $question->load_many($param);
$params = array('cnt' => FALSE, 'show' => $this->Paging["show"], 'page' => $this->Paging["page"], 'sort_by' => 'changed', 'direction' => 'DESC');
$data = $question->load_many($params);
$links = objtoarray($data);
$params = array('cnt' => FALSE, 'show' => 1, 'page' => 1, 'is_active' => 1, 'sort_by' => 'changed', 'direction' => 'DESC');
$data = $question->load_many($params);
$this->selected = @$data[0]->content_id;
return $links;
}
示例2: render
function render()
{
$this->title = __('Answers the Question of the Day');
$question = new Question();
$params = array('cnt' => FALSE, 'show' => 1, 'page' => 1, 'is_active' => 1, 'sort_by' => 'changed', 'direction' => 'DESC');
$data = $question->load_many($params);
$this->links = objtoarray($data);
$this->inner_HTML = $this->generate_inner_html();
$network_stats = parent::render();
return $network_stats;
}
示例3: render
function render()
{
$this->title = __("Question of the Day");
$question = new Question();
//-- fix by Z.Hron - show Question module only if $questions_total > 0
$chk_cnt_params = array('cnt' => TRUE, 'is_active' => 1, 'show' => 1);
$questions_total = $question->load_many($chk_cnt_params);
if ($questions_total > 0) {
//--
$params = array('cnt' => FALSE, 'show' => 1, 'page' => 1, 'is_active' => 1, 'sort_by' => 'changed', 'direction' => 'DESC');
$data = $question->load_many($params);
$this->links = objtoarray($data);
$this->inner_HTML = $this->generate_inner_html();
$network_stats = parent::render();
return $network_stats;
//--
} else {
return null;
}
//--
}
示例4: Question
function get_links()
{
$question = new Question();
$params = array('cnt' => FALSE, 'show' => 1, 'page' => 1, 'sort_by' => 'changed', 'direction' => 'DESC');
$data = $question->load_many($params);
$links = objtoarray($data);
$this->title = $links[0]['body'];
$this->question_id = $links[0]['content_id'];
$comment = new Comment();
$comment->parent_id = $this->question_id;
$comment->parent_type = TYPE_ANSWER;
$this->Paging["count"] = $comment->get_multiples_comment($cnt = TRUE);
$links = $comment->get_multiples_comment($cnt = FALSE, $this->Paging["show"], $this->Paging["page"]);
return $links;
}
示例5: Question
function get_links()
{
$question = new Question();
$params = array('cnt' => FALSE, 'show' => 1, 'page' => 1, 'sort_by' => 'changed', 'direction' => 'DESC');
$data = $question->load_many($params);
$links = NULL;
if (!empty($data)) {
$links = objtoarray($data);
$links = current($links);
$this->title = $links['body'];
$this->question_id = $links['content_id'];
$comment = new Comment();
$comment->parent_id = $this->question_id;
$comment->parent_type = TYPE_ANSWER;
$this->Paging['count'] = $comment->get_multiples_comment(TRUE);
$links = $comment->get_multiples_comment(FALSE, $this->Paging['show'], $this->Paging['page']);
}
return $links;
}