ApiPlatform\Core\JsonLd\ContextBuilder::getEntrypointContext PHP Метод

getEntrypointContext() публичный Метод

public getEntrypointContext ( integer $referenceType = UrlGeneratorInterface::ABS_PATH ) : array
$referenceType integer
Результат array
    public function getEntrypointContext(int $referenceType = UrlGeneratorInterface::ABS_PATH) : array
    {
        $context = $this->getBaseContext($referenceType);
        foreach ($this->resourceNameCollectionFactory->create() as $resourceClass) {
            $resourceMetadata = $this->resourceMetadataFactory->create($resourceClass);
            $resourceName = lcfirst($resourceMetadata->getShortName());
            $context[$resourceName] = ['@id' => 'Entrypoint/' . $resourceName, '@type' => '@id'];
        }
        return $context;
    }