vff.module in Field Formatter Template 8
Same filename and directory in other branches
Contains vff.module.
File
modules/vff/vff.moduleView source
<?php
/**
* @file
* Contains vff.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function vff_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the vff module.
case 'help.page.vff':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Views Formatter') . '</p>';
return $output;
default:
}
}
/**
* Implements hook_theme_suggestions_alter().
*/
function vff_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
if ($hook === 'views_view' && isset($variables['view'])) {
$options = $variables['view']->style_plugin->options;
if (!empty($options['vff_clean_template'])) {
$suggestions[] = 'views_view__vff';
}
}
}
/**
* Implements hook_theme().
*
* Register views theming functions and those that are defined via views plugin
* definitions.
*/
function vff_theme($existing, $type, $theme, $path) {
return [
'views_view__vff' => [
'variables' => [],
'template' => 'views-view--vff',
'base hook' => 'views_view',
],
];
}
Functions
Name | Description |
---|---|
vff_help | Implements hook_help(). |
vff_theme | Implements hook_theme(). |
vff_theme_suggestions_alter | Implements hook_theme_suggestions_alter(). |