protected function Event::createEventDate in Open Social 10.3.x
Same name and namespace in other branches
- 8.9 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::createEventDate()
- 8 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::createEventDate()
- 8.2 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::createEventDate()
- 8.3 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::createEventDate()
- 8.4 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::createEventDate()
- 8.5 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::createEventDate()
- 8.6 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::createEventDate()
- 8.7 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::createEventDate()
- 8.8 modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::createEventDate()
- 10.0.x modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::createEventDate()
- 10.1.x modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::createEventDate()
- 10.2.x modules/custom/social_demo/src/Plugin/DemoContent/Event.php \Drupal\social_demo\Plugin\DemoContent\Event::createEventDate()
Function to calculate the date.
1 call to Event::createEventDate()
- Event::getEntry in modules/
custom/ social_demo/ src/ Plugin/ DemoContent/ Event.php - Makes an array with data of an entity.
File
- modules/
custom/ social_demo/ src/ Plugin/ DemoContent/ Event.php, line 103
Class
- Event
- Event Plugin for demo content.
Namespace
Drupal\social_demo\Plugin\DemoContentCode
protected function createEventDate($date_string) {
// Split from delimiter.
$timestamp = explode('|', $date_string);
$date = strtotime($timestamp[0]);
$date = date('Y-m-d', $date) . 'T' . $timestamp[1] . ':00';
return $date;
}