public function Group::setEvent in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 src/Entity/Group.php \Drupal\rng\Entity\Group::setEvent()
- 3.x src/Entity/Group.php \Drupal\rng\Entity\Group::setEvent()
Set associated event.
Parameters
ContentEntityInterface $entity:
Return value
\Drupal\rng\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\EntityCode
public function setEvent(ContentEntityInterface $entity = NULL) {
$this
->set('event', [
'entity' => $entity,
]);
return $this;
}