Filter.php

Same filename in this branch
  1. 10 core/modules/jsonapi/src/Query/Filter.php
  2. 10 core/modules/filter/src/Annotation/Filter.php
Same filename in other branches
  1. 9 core/modules/jsonapi/src/Query/Filter.php
  2. 9 core/modules/filter/src/Annotation/Filter.php
  3. 8.9.x core/modules/jsonapi/src/Query/Filter.php
  4. 8.9.x core/modules/filter/src/Annotation/Filter.php
  5. 11.x core/modules/jsonapi/src/Query/Filter.php
  6. 11.x core/modules/filter/src/Annotation/Filter.php
  7. 11.x core/modules/filter/src/Attribute/Filter.php

Namespace

Drupal\filter\Attribute

File

core/modules/filter/src/Attribute/Filter.php

View source
<?php

declare (strict_types=1);
namespace Drupal\filter\Attribute;

use Drupal\Component\Plugin\Attribute\Plugin;
use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * Defines a filter attribute for plugin discovery.
 *
 * Plugin Namespace: Plugin\Filter
 *
 * For a working example, see \Drupal\filter\Plugin\Filter\FilterHtml
 *
 * @see \Drupal\filter\FilterPluginManager
 * @see \Drupal\filter\Plugin\FilterInterface
 * @see \Drupal\filter\Plugin\FilterBase
 * @see plugin_api
 */
class Filter extends Plugin {
    
    /**
     * Constructs a Filter attribute.
     *
     * @param string $id
     *   The plugin ID.
     * @param \Drupal\Core\StringTranslation\TranslatableMarkup $title
     *   The human-readable name of the filter. This is used as an administrative
     *   summary of what the filter does.
     * @param int $type
     *   The filter type. Values are defined in
     *   \Drupal\filter\Plugin\FilterInterface.
     * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
     *   (optional) Additional administrative information about the filter's
     *   behavior.
     * @param int $weight
     *   (optional) A default weight for the filter in new text formats.
     * @param bool $status
     *   (optional) Whether this filter is enabled or disabled by default.
     * @param array $settings
     *   (optional) The default settings for the filter.
     */
    public function __construct(string $id, TranslatableMarkup $title, int $type, ?TranslatableMarkup $description = NULL, int $weight = 0, bool $status = FALSE, array $settings = []) {
    }

}

Classes

Title Deprecated Summary
Filter Defines a filter attribute for plugin discovery.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.