You are here

public function EventDate::generateOptions in Open Social 8.9

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_event/src/Plugin/views/filter/EventDate.php \Drupal\social_event\Plugin\views\filter\EventDate::generateOptions()
  2. 10.0.x modules/social_features/social_event/src/Plugin/views/filter/EventDate.php \Drupal\social_event\Plugin\views\filter\EventDate::generateOptions()
  3. 10.1.x modules/social_features/social_event/src/Plugin/views/filter/EventDate.php \Drupal\social_event\Plugin\views\filter\EventDate::generateOptions()
  4. 10.2.x modules/social_features/social_event/src/Plugin/views/filter/EventDate.php \Drupal\social_event\Plugin\views\filter\EventDate::generateOptions()

Retrieves the allowed values for the date filter.

Return value

array An array of allowed values in the form key => label.

File

modules/social_features/social_event/src/Plugin/views/filter/EventDate.php, line 89

Class

EventDate
Filter events by start date and end date.

Namespace

Drupal\social_event\Plugin\views\filter

Code

public function generateOptions() {
  return [
    self::UPCOMING_EVENTS => $this
      ->t('Ongoing and upcoming events'),
    self::PAST_EVENTS => $this
      ->t('Past events'),
  ];
}