Reference
C
Class

ApiPlatform\JsonLd\Action\ContextAction

Generates JSON-LD contexts.

class ApiPlatform\JsonLd\Action\ContextAction
{
    public __construct(ApiPlatform\JsonLd\ContextBuilderInterface $contextBuilder, ApiPlatform\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory)
    public __invoke(string $shortName): array
}
class ApiPlatform\JsonLd\Action\ContextAction
{
    public __construct(ApiPlatform\JsonLd\ContextBuilderInterface $contextBuilder, ApiPlatform\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory)
    public __invoke(string $shortName): array
}

Methods

__construct

public __construct(ApiPlatform\JsonLd\ContextBuilderInterface $contextBuilder, ApiPlatform\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory)
public __construct(ApiPlatform\JsonLd\ContextBuilderInterface $contextBuilder, ApiPlatform\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory, ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory)

Parameters

contextBuilderApiPlatform\JsonLd\ContextBuilderInterface
resourceNameCollectionFactoryApiPlatform\Metadata\Resource\Factory\ResourceNameCollectionFactoryInterface
resourceMetadataCollectionFactoryApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface

__invoke

Generates a context according to the type requested.

public __invoke(string $shortName): array
public __invoke(string $shortName): array

Parameters

shortNamestring

Returns

array

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop