public function FullCalendar::parseFields in FullCalendar 8.2
Same name and namespace in other branches
- 8.5 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::parseFields()
- 8 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::parseFields()
- 8.3 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::parseFields()
- 8.4 src/Plugin/views/style/FullCalendar.php \Drupal\fullcalendar\Plugin\views\style\FullCalendar::parseFields()
Extracts date fields from the view.
1 call to FullCalendar::parseFields()
- FullCalendar::validate in src/
Plugin/ views/ style/ FullCalendar.php - Validate that the plugin is correct and can be saved.
File
- src/
Plugin/ views/ style/ FullCalendar.php, line 187
Class
- FullCalendar
- Plugin annotation @ViewsStyle( id = "fullcalendar", title = @Translation("FullCalendar"), help = @Translation("Displays items on a calendar."), theme = "views_view--fullcalendar", display_types = {"normal"} )
Namespace
Drupal\fullcalendar\Plugin\views\styleCode
public function parseFields() {
$this->view
->initHandlers();
$labels = $this->displayHandler
->getFieldLabels();
$date_fields = [];
/** @var \Drupal\views\Plugin\views\field\EntityField $field */
foreach ($this->view->field as $id => $field) {
if (fullcalendar_field_is_date($field)) {
$date_fields[$id] = $labels[$id];
}
}
return $date_fields;
}