You are here

public function Registrant::setIdentity in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Entity/Registrant.php \Drupal\rng\Entity\Registrant::setIdentity()
  2. 3.x src/Entity/Registrant.php \Drupal\rng\Entity\Registrant::setIdentity()

Set associated identity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The identity to set.

Return value

\Drupal\rng\RegistrantInterface Returns registrant for chaining.

Overrides RegistrantInterface::setIdentity

File

src/Entity/Registrant.php, line 85

Class

Registrant
Defines the registrant entity class.

Namespace

Drupal\rng\Entity

Code

public function setIdentity(EntityInterface $entity) {
  $this
    ->set('identity', array(
    'entity' => $entity,
  ));
  return $this;
}