public function Registration::setEvent in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 src/Entity/Registration.php \Drupal\rng\Entity\Registration::setEvent()
- 3.x src/Entity/Registration.php \Drupal\rng\Entity\Registration::setEvent()
Set associated event.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity:
Return value
\Drupal\rng\RegistrationInterface Returns registration for chaining.
Overrides RegistrationInterface::setEvent
File
- src/
Entity/ Registration.php, line 79
Class
- Registration
- Defines the registration entity class.
Namespace
Drupal\rng\EntityCode
public function setEvent(ContentEntityInterface $entity) {
$this
->set('event', array(
'entity' => $entity,
));
return $this;
}