date_recur_modular.module in Recurring Date Field Modular Widgets 8
File
date_recur_modular.module
View source
<?php
declare (strict_types=1);
function date_recur_modular_theme(array $existing, string $type, string $theme, string $path) : array {
return [
'date_recur_modular_alpha_widget' => [
'render element' => 'widget',
],
'date_recur_modular_oscar_widget' => [
'render element' => 'widget',
],
'date_recur_modular_sierra_widget' => [
'render element' => 'widget',
],
'date_recur_modular_sierra_widget_modal_form' => [
'render element' => 'form',
],
'date_recur_modular_sierra_widget_modal_occurrences_form' => [
'render element' => 'form',
],
'date_recur_modular_sierra_widget_modal_form_ends' => [
'render element' => 'form',
],
];
}
function template_preprocess_date_recur_modular_alpha_widget(array &$variables) : void {
$variables['attributes']['class'][] = 'date-recur-modular-alpha-widget';
$variables['#attached']['library'][] = 'date_recur_modular/date_recur_modular_alpha_widget';
}
function template_preprocess_date_recur_modular_oscar_widget(array &$variables) : void {
$variables['attributes']['class'][] = 'date-recur-modular-oscar-widget';
$variables['#attached']['library'][] = 'date_recur_modular/date_recur_modular_oscar_widget';
}
function template_preprocess_date_recur_modular_sierra_widget(array &$variables) : void {
$variables['attributes']['class'][] = 'date-recur-modular-sierra-widget';
$variables['#attached']['library'][] = 'date_recur_modular/date_recur_modular_sierra_widget';
}
function template_preprocess_date_recur_modular_sierra_widget_modal_form(array &$variables) : void {
$variables['attributes']['class'][] = 'date-recur-modular-sierra-modal';
$variables['form']['weekdays']['#attributes']['class'][] = 'container-inline';
$variables['form']['weekdays']['#attributes']['class'][] = 'weekdays';
}
function template_preprocess_date_recur_modular_sierra_widget_modal_occurrences_form(array &$variables) : void {
$variables['attributes']['class'][] = 'date-recur-modular-sierra-occurences-modal';
$variables['form']['occurrences']['show_more']['#attributes']['class'][] = 'show-more-wrapper';
}