FilterFormat::setFilterConfig

public FilterFormat::setFilterConfig($instance_id, array $configuration)

Sets the configuration for a filter plugin instance.

Sets or replaces the configuration of a filter plugin in $this->filters, and if instantiated already, also ensures that the actual filter plugin on the FilterPluginCollection contains the identical configuration.

Parameters

string $instance_id: The ID of a filter plugin to set the configuration for.

array $configuration: The filter plugin configuration to set.

Overrides FilterFormatInterface::setFilterConfig

File

core/modules/filter/src/Entity/FilterFormat.php, line 155

Class

FilterFormat
Represents a text format.

Namespace

Drupal\filter\Entity

Code

public function setFilterConfig($instance_id, array $configuration) {
  $this->filters[$instance_id] = $configuration;
  if (isset($this->filterCollection)) {
    $this->filterCollection->setInstanceConfiguration($instance_id, $configuration);
  }
  return $this;
}
doc_Drupal
2016-10-29 09:14:33
Comments
Leave a Comment

Please login to continue.