class FilterController
Same name in other branches
- 9 core/modules/filter/src/Controller/FilterController.php \Drupal\filter\Controller\FilterController
- 10 core/modules/filter/src/Controller/FilterController.php \Drupal\filter\Controller\FilterController
- 11.x core/modules/filter/src/Controller/FilterController.php \Drupal\filter\Controller\FilterController
Controller routines for filter routes.
Hierarchy
- class \Drupal\filter\Controller\FilterController
Expanded class hierarchy of FilterController
File
-
core/
modules/ filter/ src/ Controller/ FilterController.php, line 10
Namespace
Drupal\filter\ControllerView source
class FilterController {
/**
* Displays a page with long filter tips.
*
* @param \Drupal\filter\FilterFormatInterface|null $filter_format
* (optional) A filter format, or NULL to show tips for all formats.
* Defaults to NULL.
*
* @return array
* A renderable array.
*
* @see template_preprocess_filter_tips()
*/
public function filterTips(FilterFormatInterface $filter_format = NULL) {
$tips = $filter_format ? $filter_format->id() : -1;
$build = [
'#theme' => 'filter_tips',
'#long' => TRUE,
'#tips' => _filter_tips($tips, TRUE),
];
return $build;
}
/**
* Gets the label of a filter format.
*
* @param \Drupal\filter\FilterFormatInterface $filter_format
* The filter format.
*
* @return string
* The label of the filter format.
*/
public function getLabel(FilterFormatInterface $filter_format) {
return $filter_format->label();
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
FilterController::filterTips | public | function | Displays a page with long filter tips. |
FilterController::getLabel | public | function | Gets the label of a filter format. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.