public function getContentService() { if ($this->contentService !== null) { return $this->contentService; } $this->contentService = new ContentService($this->repository->getContentService(), $this->signalDispatcher); return $this->contentService; }
/** * Gets ContentType ID based on $contentId. * * @param mixed $contentId * * @return int|null */ protected function getContentTypeId($contentId) { $contentService = $this->repository->getContentService(); $contentTypeId = null; try { $contentTypeId = $contentService->loadContentInfo($contentId)->contentTypeId; } catch (Exception $e) { } return $contentTypeId; }