You are here

public function Group::setEvent in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 8 src/Entity/Group.php \Drupal\rng\Entity\Group::setEvent()
  2. 3.x src/Entity/Group.php \Drupal\rng\Entity\Group::setEvent()

Set associated event.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity:

Return value

\Drupal\rng\Entity\RegistrationInterface Returns group for chaining.

Overrides GroupInterface::setEvent

File

src/Entity/Group.php, line 59

Class

Group
Defines the application group entity class.

Namespace

Drupal\rng\Entity

Code

public function setEvent(ContentEntityInterface $entity = NULL) {
  $this
    ->set('event', [
    'entity' => $entity,
  ]);
  return $this;
}