You are here

public function CalendarEvent::getDateItems in Opigno calendar event 8

Same name and namespace in other branches
  1. 3.x src/Entity/CalendarEvent.php \Drupal\opigno_calendar_event\Entity\CalendarEvent::getDateItems()

Returns the calendar event date items.

Return value

\Drupal\datetime\Plugin\Field\FieldType\DateTimeFieldItemList Сalendar event date items.

Overrides CalendarEventInterface::getDateItems

File

src/Entity/CalendarEvent.php, line 96

Class

CalendarEvent
Defines the "Calendar event" entity class.

Namespace

Drupal\opigno_calendar_event\Entity

Code

public function getDateItems() {
  if (!isset($this->dateFieldName)) {
    $type = static::getCalendarEventType($this
      ->bundle());
    $this->dateFieldName = static::getDateFieldName($type);
  }
  return $this
    ->get($this->dateFieldName);
}