Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LabelOnlyResourceObject.php

function 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;
}
RSS feed
Powered by Drupal