/** * 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 bool $p_hasNextElements * @return array */ protected function CreateList($p_start = 0, $p_limit = 0, array $p_parameters, &$p_count) { if (!defined('PLUGIN_BLOG_ADMIN_MODE')) { $operator = new Operator('is', 'integer'); $context = CampTemplate::singleton()->context(); if (!$p_parameters['ignore_status']) { $comparisonOperation = new ComparisonOperation('status', $operator, 'online'); $this->m_constraints[] = $comparisonOperation; } if (!$p_parameters['ignore_admin_status']) { $comparisonOperation = new ComparisonOperation('admin_status', $operator, 'online'); $this->m_constraints[] = $comparisonOperation; } if ($context->blogentry->defined && !$p_parameters['ignore_blogentry']) { $comparisonOperation = new ComparisonOperation('entry_id', $operator, $context->blogentry->identifier); $this->m_constraints[] = $comparisonOperation; } elseif ($context->blog->defined && !$p_parameters['ignore_blog']) { $comparisonOperation = new ComparisonOperation('blog_id', $operator, $context->blog->identifier); $this->m_constraints[] = $comparisonOperation; } if ($context->language->defined && $p_parameters['ignore_language']) { $comparisonOperation = new ComparisonOperation('language_id', $operator, $context->language->number); $this->m_constraints[] = $comparisonOperation; } } $BlogCommentsList = BlogComment::GetList($this->m_constraints, $this->m_order, $p_start, $p_limit, $p_count); $metaBlogCommentsList = array(); foreach ($BlogCommentsList as $blogComment) { $metaBlogCommentsList[] = new MetaBlogComment($blogComment->getId()); } return $metaBlogCommentsList; }