class EntityResourcePostRouteSubscriber implements EventSubscriberInterface (View source)

Generates a 'create' route for an entity type if it has a REST POST route.

Properties

protected EntityStorageInterface $resourceConfigStorage

The REST resource config storage.

Methods

__construct(EntityTypeManagerInterface $entity_type_manager)

Constructs a new EntityResourcePostRouteSubscriber instance.

onDynamicRouteEvent(RouteBuildEvent $event)

Provides routes on route rebuild time.

static array
getSubscribedEvents()

{@inheritdoc}

Details

__construct(EntityTypeManagerInterface $entity_type_manager)

Constructs a new EntityResourcePostRouteSubscriber instance.

Parameters

EntityTypeManagerInterface $entity_type_manager

The entity type manager.

onDynamicRouteEvent(RouteBuildEvent $event)

Provides routes on route rebuild time.

Parameters

RouteBuildEvent $event

The route build event.

static array getSubscribedEvents()

{@inheritdoc}

Return Value

array