lib/Validator/LocationValidator.php
private function getContentType(EzLocation $location): ContentType
    {
        if (method_exists($location, 'getContent') && method_exists($location->getContent(), 'getContentType')) {
            return $location->getContent()->getContentType();
        }

        // @deprecated Remove when support for eZ kernel < 7.4 ends

        return $this->repository->getContentTypeService()->loadContentType(
            $location->contentInfo->contentTypeId
        );
    }
private function getContentType(EzLocation $location): ContentType
    {
        if (method_exists($location, 'getContent') && method_exists($location->getContent(), 'getContentType')) {
            return $location->getContent()->getContentType();
        }

        // @deprecated Remove when support for eZ kernel < 7.4 ends

        return $this->repository->getContentTypeService()->loadContentType(
            $location->contentInfo->contentTypeId
        );
    }
private function getContentType ( EzLocation $ location ) : ContentType { if ( method_exists ( $ location , 'getContent' ) && method_exists ( $ location -> getContent ( ) , 'getContentType' ) ) { return $ location -> getContent ( ) -> getContentType ( ) ; } // @deprecated Remove when support for eZ kernel < 7.4 ends return $ this -> repository -> getContentTypeService ( ) -> loadContentType ( $ location -> contentInfo -> contentTypeId ) ; }
Loads the content type for provided location.

@deprecated Acts as a BC layer for eZ kernel <7.4
Loads the content type for provided location .