FilterFormat::disable

public FilterFormat::disable()

Disables the configuration entity.

Return value

$this

Overrides ConfigEntityBase::disable

File

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

Class

FilterFormat
Represents a text format.

Namespace

Drupal\filter\Entity

Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
public function disable() {
  if ($this->isFallbackFormat()) {
    throw new \LogicException("The fallback text format '{$this->id()}' cannot be disabled.");
  }
 
  parent::disable();
 
  // Allow modules to react on text format deletion.
  \Drupal::moduleHandler()->invokeAll('filter_format_disable', array($this));
 
  // Clear the filter cache whenever a text format is disabled.
  filter_formats_reset();
 
  return $this;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.