protected function ResourceObjectEntityLoaderTrait::setEntityRepository in JSON:API Hypermedia 8
Sets the entity repository.
Parameters
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository service.
File
- examples/
Plugin/ jsonapi_hypermedia/ LinkProvider/ ResourceObjectEntityLoaderTrait.php, line 28
Class
- ResourceObjectEntityLoaderTrait
- Trait for loading the entity represented by a resource object.
Namespace
Drupal\jsonapi_hypermedia\Plugin\jsonapi_hypermedia\LinkProviderCode
protected function setEntityRepository(EntityRepositoryInterface $entity_repository) {
$this->entityRepository = $entity_repository;
}