Jarves\ContentRender::getSlotContents PHP Метод

getSlotContents() публичный Метод

public getSlotContents ( integer $nodeId, integer $slotId ) : Content[]
$nodeId integer
$slotId integer
Результат Jarves\Model\Content[]
    public function getSlotContents($nodeId, $slotId)
    {
        if ($contents = $this->pageStack->getPageResponse()->getPageContent()) {
            if (is_array($contents) && $contents[$slotId]) {
                return $contents[$slotId];
            } else {
                if (is_string($contents)) {
                    return $contents;
                }
            }
        }
        $cacheKey = 'core/contents/' . $nodeId . '.' . $slotId;
        $cache = $this->cacher->getDistributedCache($cacheKey);
        $contents = null;
        if ($cache) {
            return unserialize($cache);
        }
        $contents = ContentQuery::create()->filterByNodeId($nodeId)->filterByBoxId($slotId)->orderByRank()->find();
        $this->cacher->setDistributedCache($cacheKey, serialize($contents));
        return $contents;
    }