function FilterFormat::isFallbackFormat

Returns if this format is the fallback format.

The fallback format can never be disabled. It must always be available.

Return value

bool TRUE if this format is the fallback format, FALSE otherwise.

Overrides FilterFormatInterface::isFallbackFormat

2 calls to FilterFormat::isFallbackFormat()
FilterFormat::disable in core/modules/filter/src/Entity/FilterFormat.php
#[ActionMethod(adminLabel: new TranslatableMarkup('Disable'), pluralize: FALSE)]
FilterFormat::getPermissionName in core/modules/filter/src/Entity/FilterFormat.php
Returns the machine-readable permission name for the text format.

File

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

Class

FilterFormat
Represents a text format.

Namespace

Drupal\filter\Entity

Code

public function isFallbackFormat() {
  $fallback_format = \Drupal::config('filter.settings')->get('fallback_format');
  return $this->id() == $fallback_format;
}

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