public function FilterAutoP::tips

Generates a filter's tip.

A filter's tips should be informative and to the point. Short tips are preferably one-liners.

@todo Split into getSummaryItem() and buildGuidelines().

Parameters

bool $long: Whether this callback should return a short tip to display in a form (FALSE), or whether a more elaborate filter tips should be returned for theme_filter_tips() (TRUE).

Return value

string|null Translated text to display as a tip, or NULL if this filter has no tip.

Overrides FilterBase::tips

File

drupal/core/modules/filter/lib/Drupal/filter/Plugin/Filter/FilterAutoP.php, line 36
Contains \Drupal\filter\Plugin\Filter\FilterAutoP.

Class

FilterAutoP
Provides a filter to conver line breaks to HTML.

Namespace

Drupal\filter\Plugin\Filter

Code

public function tips($long = FALSE) {
  if ($long) {
    return t('Lines and paragraphs are automatically recognized. The <br /> line break, <p> paragraph and </p> close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple blank lines.');
  }
  else {
    return t('Lines and paragraphs break automatically.');
  }
}