flot_examples.module in Flot 8
A collection of module hooks for the flot_examples module.
File
flot_examples/flot_examples.moduleView source
<?php
/**
* @file
* A collection of module hooks for the flot_examples module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;
/**
* Implements hook_theme().
*/
function flot_examples_theme(array $existing, $type, $theme, $path) {
return array(
'flot_examples' => [
'variables' => [
'id' => NULL,
'text' => [],
'title' => NULL,
'demo_container_attributes' => '',
],
],
'flot_examples_series_toggle' => [
'variables' => [
'text' => [],
],
],
'flot_examples_zooming' => [
'variables' => [
'text' => [],
],
],
'flot_examples_navigate' => [],
'flot_examples_visitors' => [
'variables' => [
'text' => [],
],
],
'flot_examples_series_pie' => [],
);
}
/**
* Implements hook_help().
*/
function flot_examples_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the lab_system module.
case 'help.page.flot_examples':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$options = [
':one' => Url::fromRoute('flot_examples.content')
->toString(),
];
$output .= t('<p>This module displays <a href=":one">example graphs</a> which use the Flot plugin</p>', $options);
return $output;
default:
}
}
Functions
Name | Description |
---|---|
flot_examples_help | Implements hook_help(). |
flot_examples_theme | Implements hook_theme(). |