expand_collapse_formatter.module in Expand collapse formatter 8
Contains expand_collapse_formatter.module..
File
expand_collapse_formatter.moduleView source
<?php
/**
* @file
* Contains expand_collapse_formatter.module..
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function expand_collapse_formatter_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the expand_toggle_formatter module.
case 'help.page.expand_collapse_formatter':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('A formatter to expand and collapse text area fields.') . '</p>';
return $output;
default:
}
}
/**
* Register theme implementations.
*
* @param array $existing
* An array of existing implementations.
* @param string $type
* Whether a theme, module, etc. is being processed.
* @param string $theme
* The actual name of theme.
* @param string $path
* The directory path of the theme or module, so that it doesn't need to be
* looked up.
*
* @return array
* An associative array of information about theme implementations.
*/
function expand_collapse_formatter_theme($existing, $type, $theme, $path) {
$theme = [
'expand_collapse_formatter' => [
'variables' => [
'id' => NULL,
'trim_length' => NULL,
'default_state' => NULL,
'link_text_open' => NULL,
'link_text_close' => NULL,
'link_class_open' => NULL,
'link_class_close' => NULL,
'value' => NULL,
],
'template' => 'expand-collapse-formatter',
],
];
return $theme;
}
Functions
Name | Description |
---|---|
expand_collapse_formatter_help | Implements hook_help(). |
expand_collapse_formatter_theme | Register theme implementations. |