Программирование сайтов
10 Сен в 19:11

Изменить метки полей Views exposed filter between date

[php]
function mytheme_form_views_exposed_form_alter(array &$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
switch ($form[‘#id’]) {
case ‘views-exposed-form-myviewsname-page-1’:
$form[‘created’][‘min’][‘#title’] = ‘от’;
$form[‘created’][‘max’][‘#title’] = ‘до’;
break;
case ‘views-exposed-form-myviewsname-page-2’:
$form[‘created’][‘min’][‘#title’] = ‘от’;
$form[‘created’][‘max’][‘#title’] = ‘до’;
break;
}
}
[/php]