private getContentBlock ( ) : |
||
리턴 |
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());
}