public function Event::setStartDate in Booking and Availability Management Tools for Drupal 8
Overrides EventInterface::setStartDate
File
- modules/
bat_event/ src/ Entity/ Event.php, line 167 - Contains \Drupal\bat_event\Entity\Event.
Class
- Event
- Defines the Event entity.
Namespace
Drupal\bat_event\EntityCode
public function setStartDate(\DateTime $date) {
$value = [
'value' => $date
->format('Y-m-d\\TH:i:00'),
'end_value' => $this
->getEndDate()
->format('Y-m-d\\TH:i:00'),
];
$this
->set('event_dates', $value);
}