Gets an issues list based on the given parameters.
public static GetList ( array $params, string $p_order = null, integer $p_start, integer $p_limit, integer &$p_count, $p_skipCache = false ) : array | ||
$params | array | |
$p_order | string | An array of columns and directions to order by |
$p_start | integer | The record number to start the list |
$p_limit | integer | The offset. How many records from $p_start will be retrieved. |
$p_count | integer | The total count of the elements; this count is computed without applying the start ($p_start) and limit parameters ($p_limit) |
return | array | $issuesList An array of Issue objects |
/** * Creates the list of objects. Sets the parameter $p_hasNextElements to * true if this list is limited and elements still exist in the original * list (from which this was truncated) after the last element of this * list. * * @param int $p_start * @param int $p_limit * @param array $p_parameters * @param int &$p_count * @return array */ protected function CreateList($p_start = 0, $p_limit = 0, array $p_parameters, &$p_count) { $context = CampTemplate::singleton()->context(); if (!$context->article->defined()) { return array(); } if (!$context->language->defined()) { $languageId = $context->publication->default_language->number; } else { $languageId = $context->language->number; } $contextBox = new ContextBox(null, $context->article->number); $p_parameters['context_box'] = $contextBox->getId(); $p_parameters['article'] = $context->article->number; $BoxArticlesList = ContextBoxArticle::GetList($p_parameters, $this->m_order, $p_start, $p_limit, $p_count); $preview = $context->preview; $metaBoxArticlesList = array(); foreach ($BoxArticlesList as $articleNo) { $article = new MetaArticle($languageId, $articleNo); if ($article->defined() && ($preview || $article->is_published)) { $metaBoxArticlesList[] = $article; } } return $metaBoxArticlesList; }
public function getArticlesList() { return ContextBoxArticle::GetList($this->getId(), null, 0, 0, $p_count, FALSE); }
public function getArticlesList() { return ContextBoxArticle::GetList(array('context_box' => $this->getId()), null, 0, 0, $p_count, FALSE); }