You are here

protected function LabelOnlyResourceObject::setEntity in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/src/JsonApiResource/LabelOnlyResourceObject.php \Drupal\jsonapi\JsonApiResource\LabelOnlyResourceObject::setEntity()

Sets the underlying entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: An entity.

File

core/modules/jsonapi/src/JsonApiResource/LabelOnlyResourceObject.php, line 59

Class

LabelOnlyResourceObject
Value object decorating a ResourceObject; only its label is available.

Namespace

Drupal\jsonapi\JsonApiResource

Code

protected function setEntity(EntityInterface $entity) {
  $this->entity = $entity;
}