class FilterAutoP

Provides a filter to conver line breaks to HTML.

Plugin annotation


@Filter(
  id = "filter_autop",
  module = "filter",
  title = @Translation("Convert line breaks into HTML (i.e. <code>&lt;br&gt;</code> and <code>&lt;p&gt;</code>)"),
  type = FILTER_TYPE_MARKUP_LANGUAGE
)

Hierarchy

Expanded class hierarchy of FilterAutoP

File

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

Namespace

Drupal\filter\Plugin\Filter
View source
class FilterAutoP extends FilterBase {

  /**
   * {@inheritdoc}
   */
  public function process($text, $langcode, $cache, $cache_id) {
    return _filter_autop($text);
  }

  /**
   * {@inheritdoc}
   */
  public function tips($long = FALSE) {
    if ($long) {
      return t('Lines and paragraphs are automatically recognized. The &lt;br /&gt; line break, &lt;p&gt; paragraph and &lt;/p&gt; 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.');
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FilterAutoP::process public function Performs the filter processing. Overrides FilterInterface::process
FilterAutoP::tips public function Generates a filter's tip. Overrides FilterBase::tips
FilterBase::$bag protected property A collection of all filters this filter participates in.
FilterBase::$cache public property A Boolean indicating whether the text processed by this filter may be cached.
FilterBase::$module public property The name of the module that owns this filter.
FilterBase::$plugin_id protected property The plugin ID of this filter.
FilterBase::$settings public property An associative array containing the configured settings of this filter.
FilterBase::$status public property A Boolean indicating whether this filter is enabled.
FilterBase::$weight public property The weight of this filter compared to others in a filter collection.
FilterBase::export public function Exports the complete configuration of this filter plugin instance. Overrides FilterInterface::export
FilterBase::getDescription public function Returns the administrative description for this filter plugin. Overrides FilterInterface::getDescription
FilterBase::getLabel public function Returns the administrative label for this filter plugin. Overrides FilterInterface::getLabel
FilterBase::getType public function Returns the processing type of this filter plugin. Overrides FilterInterface::getType
FilterBase::prepare public function Prepares the text for processing. Overrides FilterInterface::prepare
FilterBase::setPluginConfiguration public function Sets the configuration for this filter plugin instance. Overrides FilterInterface::setPluginConfiguration
FilterBase::settingsForm public function Generates a filter's settings form. Overrides FilterInterface::settingsForm 2
FilterBase::__construct public function Constructs a Drupal\Component\Plugin\PluginBase object. Overrides PluginBase::__construct
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition.
PluginBase::$pluginId protected property The plugin_id.
PluginBase::getPluginDefinition public function Returns the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition
PluginBase::getPluginId public function Returns the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId