uw_ct_event.module 792 Bytes
Newer Older
1
2
3
4
5
6
7
<?php

/**
 * @file
 * Provides configuration and settings for events.
 */

8
9
use Drupal\views\ViewExecutable;

10
/**
Eric Bremner's avatar
Eric Bremner committed
11
 * Implements hook_views_pre_render().
12
 */
13
14
15
16
17
18
function uw_ct_event_views_pre_render(ViewExecutable $view) {

  // Remove exposed filters on block listing view.
  if ($view->id() == 'uw_view_events' &&
    $view->getTitle() == 'Event listing') {
    unset($view->exposed_widgets);
19
20
  }
}
21
22
23
24
25
26
27
28
29
30

/**
 * Implements hook_geofield_map_latlon_element_alter().
 */
function uw_ct_event_geofield_map_latlon_element_alter(array &$map_settings, array &$complete_form, array &$form_state_values) {
  // Library for editing uw_ct_event.
  if ($map_settings['id'] === 'edit-field-uw-event-location-coord-0-value') {
    $complete_form['#attached']['library'][] = 'uw_ct_event/uw_ct_event_edit';
  }
}