Esempio n. 1
0
	/**
	 * 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)
	{
	    $operator = new Operator('is', 'integer');
	    $context = CampTemplate::singleton()->context();
	    
	    if (!$context->blog->defined) {
	        return array();
	    }
	    
	    $comparisonOperation = new ComparisonOperation('fk_blog_id', $operator, $context->blog->identifier);
	    $this->m_constraints[] = $comparisonOperation;

	    $blogTopicsList = BlogTopic::GetList($this->m_constraints, $this->m_order, $p_start, $p_limit, $p_count);
	    $metaTopicsList = array();
	    
	    foreach ($blogTopicsList as $topic) {
	        $metaTopicsList[] = new MetaTopic($topic->getTopicId());
	    }
	    
	    return $metaTopicsList;
	}