SectionsList::CreateList PHP Метод

CreateList() защищенный Метод

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.
protected CreateList ( integer $p_start, integer $p_limit, array $p_parameters, &$p_count ) : array
$p_start integer
$p_limit integer
$p_parameters array
Результат array
    protected function CreateList($p_start = 0, $p_limit = 0, array $p_parameters, &$p_count)
    {
        $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
        $cacheKey = $cacheService->getCacheKey(array('metaSectionList', implode('-', $this->m_constraints), implode('-', $this->m_order), $p_start, $p_limit, $p_count), 'section');
        if ($cacheService->contains($cacheKey)) {
            return $cacheService->fetch($cacheKey);
        }
        $sectionsList = Section::GetList($this->m_constraints, $this->m_order, $p_start, $p_limit, $p_count);
        $metaSectionsList = array();
        foreach ($sectionsList as $section) {
            $metaSectionsList[] = new MetaSection($section->getPublicationId(), $section->getIssueNumber(), $section->getLanguageId(), $section->getSectionNumber());
        }
        $cacheService->save($cacheKey, $metaSectionsList);
        return $metaSectionsList;
    }