3 namespace Drupal\filter\Controller;
5 use Drupal\filter\FilterFormatInterface;
8 * Controller routines for filter routes.
10 class FilterController {
13 * Displays a page with long filter tips.
15 * @param \Drupal\filter\FilterFormatInterface|null $filter_format
16 * (optional) A filter format, or NULL to show tips for all formats.
22 * @see template_preprocess_filter_tips()
24 public function filterTips(FilterFormatInterface $filter_format = NULL) {
25 $tips = $filter_format ? $filter_format->id() : -1;
28 '#theme' => 'filter_tips',
30 '#tips' => _filter_tips($tips, TRUE),
37 * Gets the label of a filter format.
39 * @param \Drupal\filter\FilterFormatInterface $filter_format
43 * The label of the filter format.
45 public function getLabel(FilterFormatInterface $filter_format) {
46 return $filter_format->label();