wwaf-8.x-1.0-beta5/wwaf.module
wwaf.module
<?php
/**
* @file
* Contains wwaf.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Render\Element;
/**
* Implements hook_help().
*/
function wwaf_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the wwaf module.
case 'help.page.wwaf':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Where We Are Finder') . '</p>';
return $output;
default:
}
}
/**
* Implements HOOK_toolbar_alter().
*/
function wwaf_toolbar_alter(&$items) {
$items['administration']['#attached']['library'][] = 'wwaf/toolbar';
}
/**
* Implements hook_views_data_alter().
*/
function wwaf_views_data_alter(array &$data) {
if (isset($data['wwaf_field_data']) && isset($data['wwaf_field_data']['gps__lat'])) {
$data['wwaf_field_data']['gps__lat']['field']['id'] = 'geolocation_field';
$data['wwaf_field_data']['gps__lat']['field']['click sortable'] = FALSE;
}
if (isset($data['wwaf_field_data']) && isset($data['wwaf_field_data']['type'])) {
$data['wwaf_field_data']['type']['filter']['id'] = 'taxonomy_index_tid';
}
}
