public static function FullCalendarDisplay::taxonomyColorCallback in Fullcalendar View 8
Same name and namespace in other branches
- 8.3 src/Plugin/views/style/FullCalendarDisplay.php \Drupal\fullcalendar_view\Plugin\views\style\FullCalendarDisplay::taxonomyColorCallback()
- 8.2 src/Plugin/views/style/FullCalendarDisplay.php \Drupal\fullcalendar_view\Plugin\views\style\FullCalendarDisplay::taxonomyColorCallback()
- 6.x src/Plugin/views/style/FullCalendarDisplay.php \Drupal\fullcalendar_view\Plugin\views\style\FullCalendarDisplay::taxonomyColorCallback()
- 5.x src/Plugin/views/style/FullCalendarDisplay.php \Drupal\fullcalendar_view\Plugin\views\style\FullCalendarDisplay::taxonomyColorCallback()
Taxonomy colors Ajax callback function.
File
- src/
Plugin/ views/ style/ FullCalendarDisplay.php, line 304
Class
- FullCalendarDisplay
- Style plugin to render content for FullCalendar.
Namespace
Drupal\fullcalendar_view\Plugin\views\styleCode
public static function taxonomyColorCallback(array &$form, FormStateInterface $form_state) {
$options = $form_state
->getValue('style_options');
$vid = $options['vocabularies'];
$taxonomy_color_service = \Drupal::service('fullcalendar_view.taxonomy_color');
if (isset($options['color_taxonomies'])) {
$defaultValues = $options['color_taxonomies'];
}
else {
$defaultValues = [];
}
// Taxonomy color boxes.
$form['color_taxonomies'] = $taxonomy_color_service
->colorInputBoxs($vid, $defaultValues, TRUE);
return $form['color_taxonomies'];
}