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;
}