protected function LabelOnlyResourceObject::setEntity in JSON:API 8.2
Sets the underlying entity.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: An entity.
File
- src/
JsonApiResource/ LabelOnlyResourceObject.php, line 59
Class
- LabelOnlyResourceObject
- Value object decorating a ResourceObject; only its label is available.
Namespace
Drupal\jsonapi\JsonApiResourceCode
protected function setEntity(EntityInterface $entity) {
$this->entity = $entity;
}