protected function loadContentTypeByIdentifier($identifier, $throwIfNotFound = true)
    {
        $contentType = null;
        try {
            $contentType = $this->contentTypeService->loadContentTypeByIdentifier($identifier);
        } catch (ApiExceptions\NotFoundException $e) {
            $notFoundException = $e;
        }

        if (!$contentType && $throwIfNotFound) {
            throw $notFoundException;
        }

        return $contentType;
    }
protected function loadContentTypeByIdentifier($identifier, $throwIfNotFound = true)
    {
        $contentType = null;
        try {
            $contentType = $this->contentTypeService->loadContentTypeByIdentifier($identifier);
        } catch (ApiExceptions\NotFoundException $e) {
            $notFoundException = $e;
        }

        if (!$contentType && $throwIfNotFound) {
            throw $notFoundException;
        }

        return $contentType;
    }
protected function loadContentTypeByIdentifier ( $ identifier , $ throwIfNotFound = true ) { $ contentType = null ; try { $ contentType = $ this -> contentTypeService -> loadContentTypeByIdentifier ( $ identifier ) ; } catch ( ApiExceptions \ NotFoundException $ e ) { $ notFoundException = $ e ; } if ( ! $ contentType && $ throwIfNotFound ) { throw $ notFoundException ; } return $ contentType ; }
Load and return a content type by its identifier.

@param  string  $identifier       content type identifier
@param  bool $throwIfNotFound  if true, throws an exception if it is not found.

@return \eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup|null
Load and return a content type by its identifier .