Backend\Modules\ContentBlocks\Actions\Edit::getContentBlock PHP Метод

getContentBlock() приватный Метод

private getContentBlock ( ) : ContentBlock | null
Результат Backend\Modules\ContentBlocks\Entity\ContentBlock | null
    private function getContentBlock()
    {
        /** @var ContentBlockRepository $contentBlockRepository */
        $contentBlockRepository = $this->get('content_blocks.repository.content_block');
        // specific revision?
        $revisionId = $this->getParameter('revision', 'int');
        if ($revisionId !== null) {
            $this->tpl->assign('usingRevision', true);
            return $contentBlockRepository->findOneByRevisionIdAndLocale($revisionId, Locale::workingLocale());
        }
        return $contentBlockRepository->findOneByIdAndLocale($this->getParameter('id', 'int'), Locale::workingLocale());
    }