function LabelOnlyResourceObject::setEntity
Same name in other branches
- 9 core/modules/jsonapi/src/JsonApiResource/LabelOnlyResourceObject.php \Drupal\jsonapi\JsonApiResource\LabelOnlyResourceObject::setEntity()
- 10 core/modules/jsonapi/src/JsonApiResource/LabelOnlyResourceObject.php \Drupal\jsonapi\JsonApiResource\LabelOnlyResourceObject::setEntity()
- 11.x 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\JsonApiResourceCode
protected function setEntity(EntityInterface $entity) {
$this->entity = $entity;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.