public function Schedule::setEvent in Business Rules 2.x
Same name and namespace in other branches
- 8 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 237
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;
}