public function Schedule::setEvent in Business Rules 8
Same name and namespace in other branches
- 2.x src/Entity/Schedule.php \Drupal\business_rules\Entity\Schedule::setEvent()
Set the event.
Parameters
\Drupal\business_rules\Events\BusinessRulesEvent $event: The event that has created the schedule.
Overrides ScheduleInterface::setEvent
File
- src/
Entity/ Schedule.php, line 233
Class
- Schedule
- Defines the Schedule entity.
Namespace
Drupal\business_rules\EntityCode
public function setEvent(BusinessRulesEvent $event) {
$stored_event = new BusinessRulesEvent($event
->getSubject(), $event
->getArguments());
$stored_event = serialize($stored_event);
$this
->set('event', $stored_event);
return $this;
}