function Filter::__construct
Constructs a Filter attribute.
Parameters
string $id: The plugin ID.
\Drupal\Core\StringTranslation\TranslatableMarkup $title: The human-readable name of the filter. This is used as an administrative summary of what the filter does.
int $type: The filter type. Values are defined in \Drupal\filter\Plugin\FilterInterface.
\Drupal\Core\StringTranslation\TranslatableMarkup|null $description: (optional) Additional administrative information about the filter's behavior.
int $weight: (optional) A default weight for the filter in new text formats.
bool $status: (optional) Whether this filter is enabled or disabled by default.
array $settings: (optional) The default settings for the filter.
Overrides Plugin::__construct
File
-
core/
modules/ filter/ src/ Attribute/ Filter.php, line 46
Class
- Filter
- Defines a filter attribute for plugin discovery.
Namespace
Drupal\filter\AttributeCode
public function __construct(public readonly string $id, public readonly TranslatableMarkup $title, public readonly int $type, public readonly ?TranslatableMarkup $description = NULL, public readonly int $weight = 0, public readonly bool $status = FALSE, public readonly array $settings = []) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.