class FilterFormat

Same name in this branch
  1. 10 core/modules/filter/src/Plugin/DataType/FilterFormat.php \Drupal\filter\Plugin\DataType\FilterFormat
  2. 10 core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d6\FilterFormat
  3. 10 core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d7\FilterFormat
Same name and namespace in other branches
  1. 9 core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat
  2. 9 core/modules/filter/src/Plugin/DataType/FilterFormat.php \Drupal\filter\Plugin\DataType\FilterFormat
  3. 9 core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d6\FilterFormat
  4. 9 core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d7\FilterFormat
  5. 8.9.x core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat
  6. 8.9.x core/modules/filter/src/Plugin/DataType/FilterFormat.php \Drupal\filter\Plugin\DataType\FilterFormat
  7. 8.9.x core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d6\FilterFormat
  8. 8.9.x core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d7\FilterFormat
  9. 11.x core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat
  10. 11.x core/modules/filter/src/Plugin/DataType/FilterFormat.php \Drupal\filter\Plugin\DataType\FilterFormat
  11. 11.x core/modules/filter/src/Plugin/migrate/source/d6/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d6\FilterFormat
  12. 11.x core/modules/filter/src/Plugin/migrate/source/d7/FilterFormat.php \Drupal\filter\Plugin\migrate\source\d7\FilterFormat

Represents a text format.

Plugin annotation


@ConfigEntityType(
  id = "filter_format",
  label = @Translation("Text format"),
  label_collection = @Translation("Text formats"),
  label_singular = @Translation("text format"),
  label_plural = @Translation("text formats"),
  label_count = @PluralTranslation(
    singular = "@count text format",
    plural = "@count text formats",
  ),
  handlers = {
    "form" = {
      "add" = "Drupal\filter\FilterFormatAddForm",
      "edit" = "Drupal\filter\FilterFormatEditForm",
      "disable" = "Drupal\filter\Form\FilterDisableForm"
    },
    "list_builder" = "Drupal\filter\FilterFormatListBuilder",
    "access" = "Drupal\filter\FilterFormatAccessControlHandler",
  },
  config_prefix = "format",
  admin_permission = "administer filters",
  entity_keys = {
    "id" = "format",
    "label" = "name",
    "weight" = "weight",
    "status" = "status"
  },
  links = {
    "edit-form" = "/admin/config/content/formats/manage/{filter_format}",
    "disable" = "/admin/config/content/formats/manage/{filter_format}/disable"
  },
  config_export = {
    "name",
    "format",
    "weight",
    "roles",
    "filters",
  }
)

Hierarchy

Expanded class hierarchy of FilterFormat

93 files declare their use of FilterFormat
AddedStylesheetsTest.php in core/modules/ckeditor5/tests/src/Functional/AddedStylesheetsTest.php
BlockTestBase.php in core/modules/block/tests/src/Functional/BlockTestBase.php
CKEditor5AllowedTagsTest.php in core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php
CKEditor5DialogTest.php in core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php
CKEditor5FragmentLinkTest.php in core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5FragmentLinkTest.php

... See full list

2 string references to 'FilterFormat'
CKEditor5::createEphemeralPairedEditor in core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php
Creates an ephemeral pair of text editor + text format config entity.
SmartDefaultSettings::computeSmartDefaultSettings in core/modules/ckeditor5/src/SmartDefaultSettings.php
Computes the closest possible equivalent settings for switching to CKEditor 5.

File

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

Namespace

Drupal\filter\Entity
View source
class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, EntityWithPluginCollectionInterface {
    
    /**
     * Unique machine name of the format.
     *
     * @todo Rename to $id.
     *
     * @var string
     */
    protected $format;
    
    /**
     * Unique label of the text format.
     *
     * Since text formats impact a site's security, two formats with the same
     * label but different filter configuration would impose a security risk.
     * Therefore, each text format label must be unique.
     *
     * @todo Rename to $label.
     *
     * @var string
     */
    protected $name;
    
    /**
     * Weight of this format in the text format selector.
     *
     * The first/lowest text format that is accessible for a user is used as
     * default format.
     *
     * @var int
     */
    protected $weight = 0;
    
    /**
     * List of user role IDs to grant access to use this format on initial creation.
     *
     * This property is always empty and unused for existing text formats.
     *
     * Default configuration objects of modules and installation profiles are
     * allowed to specify a list of user role IDs to grant access to.
     *
     * This property only has an effect when a new text format is created and the
     * list is not empty. By default, no user role is allowed to use a new format.
     *
     * @var array
     */
    protected $roles;
    
    /**
     * Configured filters for this text format.
     *
     * An associative array of filters assigned to the text format, keyed by the
     * instance ID of each filter and using the properties:
     * - id: The plugin ID of the filter plugin instance.
     * - provider: The name of the provider that owns the filter.
     * - status: (optional) A Boolean indicating whether the filter is
     *   enabled in the text format. Defaults to FALSE.
     * - weight: (optional) The weight of the filter in the text format. Defaults
     *   to 0.
     * - settings: (optional) An array of configured settings for the filter.
     *
     * Use FilterFormat::filters() to access the actual filters.
     *
     * @var array
     */
    protected $filters = [];
    
    /**
     * Holds the collection of filters that are attached to this format.
     *
     * @var \Drupal\filter\FilterPluginCollection
     */
    protected $filterCollection;
    
    /**
     * {@inheritdoc}
     */
    public function id() {
        return $this->format;
    }
    
    /**
     * {@inheritdoc}
     */
    public function filters($instance_id = NULL) {
        if (!isset($this->filterCollection)) {
            $this->filterCollection = new FilterPluginCollection(\Drupal::service('plugin.manager.filter'), $this->filters);
            $this->filterCollection
                ->sort();
        }
        if (isset($instance_id)) {
            return $this->filterCollection
                ->get($instance_id);
        }
        return $this->filterCollection;
    }
    
    /**
     * {@inheritdoc}
     */
    public function getPluginCollections() {
        return [
            'filters' => $this->filters(),
        ];
    }
    
    /**
     * {@inheritdoc}
     */
    public function setFilterConfig($instance_id, array $configuration) {
        $this->filters[$instance_id] = $configuration;
        if (isset($this->filterCollection)) {
            $this->filterCollection
                ->setInstanceConfiguration($instance_id, $configuration);
        }
        return $this;
    }
    
    /**
     * {@inheritdoc}
     */
    public function toArray() {
        $properties = parent::toArray();
        // The 'roles' property is only used during install and should never
        // actually be saved.
        unset($properties['roles']);
        return $properties;
    }
    
    /**
     * {@inheritdoc}
     */
    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', [
            $this,
        ]);
        // Clear the filter cache whenever a text format is disabled.
        filter_formats_reset();
        return $this;
    }
    
    /**
     * {@inheritdoc}
     */
    public function preSave(EntityStorageInterface $storage) {
        parent::preSave($storage);
        if (!$this->isSyncing() && $this->hasTrustedData()) {
            // Filters are sorted by keys to ensure config export diffs are easy to
            // read and there is a minimal changeset. If the save is not trusted then
            // the configuration will be sorted by StorableConfigBase.
            ksort($this->filters);
            // Ensure the filter configuration is well-formed.
            array_walk($this->filters, function (array &$config, string $filter) : void {
                $config['id'] ??= $filter;
                $config['provider'] ??= $this->filters($filter)
                    ->getPluginDefinition()['provider'];
            });
        }
        assert(is_string($this->label()), 'Filter format label is expected to be a string.');
        $this->name = trim($this->label());
    }
    
    /**
     * {@inheritdoc}
     */
    public function postSave(EntityStorageInterface $storage, $update = TRUE) {
        parent::postSave($storage, $update);
        // Clear the static caches of filter_formats() and others.
        filter_formats_reset();
        if (!$update && !$this->isSyncing()) {
            // Default configuration of modules and installation profiles is allowed
            // to specify a list of user roles to grant access to for the new format;
            // apply the defined user role permissions when a new format is inserted
            // and has a non-empty $roles property.
            // Note: user_role_change_permissions() triggers a call chain back into
            // \Drupal\filter\FilterPermissions::permissions() and lastly
            // filter_formats(), so its cache must be reset upfront.
            if (($roles = $this->get('roles')) && ($permission = $this->getPermissionName())) {
                foreach (Role::loadMultiple() as $rid => $role) {
                    $enabled = in_array($rid, $roles, TRUE);
                    user_role_change_permissions($rid, [
                        $permission => $enabled,
                    ]);
                }
            }
        }
    }
    
    /**
     * Returns if this format is the fallback format.
     *
     * The fallback format can never be disabled. It must always be available.
     *
     * @return bool
     *   TRUE if this format is the fallback format, FALSE otherwise.
     */
    public function isFallbackFormat() {
        $fallback_format = \Drupal::config('filter.settings')->get('fallback_format');
        return $this->id() == $fallback_format;
    }
    
    /**
     * {@inheritdoc}
     */
    public function getPermissionName() {
        return !$this->isFallbackFormat() ? 'use text format ' . $this->id() : FALSE;
    }
    
    /**
     * {@inheritdoc}
     */
    public function getFilterTypes() {
        $filter_types = [];
        $filters = $this->filters();
        foreach ($filters as $filter) {
            if ($filter->status) {
                $filter_types[] = $filter->getType();
            }
        }
        return array_unique($filter_types);
    }
    
    /**
     * {@inheritdoc}
     */
    public function getHtmlRestrictions() {
        // Ignore filters that are disabled or don't have HTML restrictions.
        $filters = array_filter($this->filters()
            ->getAll(), function ($filter) {
            if (!$filter->status) {
                return FALSE;
            }
            if ($filter->getType() === FilterInterface::TYPE_HTML_RESTRICTOR && $filter->getHTMLRestrictions() !== FALSE) {
                return TRUE;
            }
            return FALSE;
        });
        if (empty($filters)) {
            return FALSE;
        }
        else {
            // From the set of remaining filters (they were filtered by array_filter()
            // above), collect the list of tags and attributes that are allowed by all
            // filters, i.e. the intersection of all allowed tags and attributes.
            $restrictions = array_reduce($filters, function ($restrictions, $filter) {
                $new_restrictions = $filter->getHTMLRestrictions();
                // The first filter with HTML restrictions provides the initial set.
                if (!isset($restrictions)) {
                    return $new_restrictions;
                }
                else {
                    // Track the intersection of allowed tags.
                    if (isset($restrictions['allowed'])) {
                        $intersection = $restrictions['allowed'];
                        foreach ($intersection as $tag => $attributes) {
                            // If the current tag is not allowed by the new filter, then it's
                            // outside of the intersection.
                            if (!array_key_exists($tag, $new_restrictions['allowed'])) {
                                // The exception is the asterisk (which applies to all tags): it
                                // does not need to be allowed by every filter in order to be
                                // used; not every filter needs attribute restrictions on all tags.
                                if ($tag === '*') {
                                    continue;
                                }
                                unset($intersection[$tag]);
                            }
                            else {
                                $current_attributes = $intersection[$tag];
                                $new_attributes = $new_restrictions['allowed'][$tag];
                                // The current intersection does not allow any attributes, never
                                // allow.
                                if (!is_array($current_attributes) && $current_attributes == FALSE) {
                                    continue;
                                }
                                elseif (!is_array($current_attributes) && $current_attributes == TRUE && ($new_attributes == FALSE || is_array($new_attributes))) {
                                    $intersection[$tag] = $new_attributes;
                                }
                                elseif (is_array($current_attributes) && $new_attributes == FALSE) {
                                    $intersection[$tag] = $new_attributes;
                                }
                                elseif (is_array($current_attributes) && $new_attributes == TRUE) {
                                    continue;
                                }
                                elseif ($current_attributes == $new_attributes) {
                                    continue;
                                }
                                else {
                                    $intersection[$tag] = array_intersect_key($intersection[$tag], $new_attributes);
                                    foreach (array_keys($intersection[$tag]) as $attribute_value) {
                                        $intersection[$tag][$attribute_value] = $intersection[$tag][$attribute_value] && $new_attributes[$attribute_value];
                                    }
                                }
                            }
                        }
                        $restrictions['allowed'] = $intersection;
                    }
                    // Simplification: if the only remaining allowed tag is the asterisk
                    // (which contains attribute restrictions that apply to all tags),
                    // then effectively nothing is allowed.
                    if (count($restrictions['allowed']) === 1 && array_key_exists('*', $restrictions['allowed'])) {
                        $restrictions['allowed'] = [];
                    }
                    return $restrictions;
                }
            }, NULL);
            return $restrictions;
        }
    }
    
    /**
     * {@inheritdoc}
     */
    public function removeFilter($instance_id) {
        unset($this->filters[$instance_id]);
        $this->filterCollection
            ->removeInstanceId($instance_id);
    }
    
    /**
     * {@inheritdoc}
     */
    public function onDependencyRemoval(array $dependencies) {
        $changed = parent::onDependencyRemoval($dependencies);
        $filters = $this->filters();
        foreach ($filters as $filter) {
            // Remove disabled filters, so that this FilterFormat config entity can
            // continue to exist.
            if (!$filter->status && in_array($filter->provider, $dependencies['module'])) {
                $this->removeFilter($filter->getPluginId());
                $changed = TRUE;
            }
        }
        return $changed;
    }
    
    /**
     * {@inheritdoc}
     */
    protected function calculatePluginDependencies(PluginInspectionInterface $instance) {
        // Only add dependencies for plugins that are actually configured. This is
        // necessary because the filter plugin collection will return all available
        // filter plugins.
        // @see \Drupal\filter\FilterPluginCollection::getConfiguration()
        if (isset($this->filters[$instance->getPluginId()])) {
            parent::calculatePluginDependencies($instance);
        }
    }

}

Members

Title Sort descending Modifiers Object type Summary Member alias Overriden Title Overrides
CacheableDependencyTrait::$cacheContexts protected property Cache contexts.
CacheableDependencyTrait::$cacheMaxAge protected property Cache max-age.
CacheableDependencyTrait::$cacheTags protected property Cache tags.
CacheableDependencyTrait::setCacheability protected function Sets cacheability; useful for value object constructors.
ConfigEntityBase::$isUninstalling private property Whether the config is being deleted by the uninstall process.
ConfigEntityBase::$langcode protected property The language code of the entity's default language.
ConfigEntityBase::$originalId protected property The original ID of the configuration entity.
ConfigEntityBase::$status protected property The enabled/disabled status of the configuration entity. 4
ConfigEntityBase::$third_party_settings protected property
ConfigEntityBase::$trustedData protected property Trust supplied data and not use configuration schema on save.
ConfigEntityBase::$uuid protected property The UUID for this entity.
ConfigEntityBase::$_core protected property
ConfigEntityBase::addDependency protected function Overrides \Drupal\Core\Entity\DependencyTrait:addDependency().
ConfigEntityBase::calculateDependencies public function Calculates dependencies and stores them in the dependency property. Overrides ConfigEntityInterface::calculateDependencies 13
ConfigEntityBase::createDuplicate public function Creates a duplicate of the entity. Overrides EntityBase::createDuplicate 1
ConfigEntityBase::enable public function Enables the configuration entity. Overrides ConfigEntityInterface::enable
ConfigEntityBase::get public function Returns the value of a property. Overrides ConfigEntityInterface::get
ConfigEntityBase::getCacheTagsToInvalidate public function Returns the cache tags that should be used to invalidate caches. Overrides EntityBase::getCacheTagsToInvalidate 1
ConfigEntityBase::getConfigDependencyName public function Gets the configuration dependency name. Overrides EntityBase::getConfigDependencyName
ConfigEntityBase::getConfigManager protected static function Gets the configuration manager.
ConfigEntityBase::getConfigTarget public function Gets the configuration target identifier for the entity. Overrides EntityBase::getConfigTarget
ConfigEntityBase::getDependencies public function Gets the configuration dependencies. Overrides ConfigEntityInterface::getDependencies
ConfigEntityBase::getOriginalId public function Gets the original ID. Overrides EntityBase::getOriginalId
ConfigEntityBase::getThirdPartyProviders public function Gets the list of third parties that store information. Overrides ThirdPartySettingsInterface::getThirdPartyProviders
ConfigEntityBase::getThirdPartySetting public function Gets the value of a third-party setting. Overrides ThirdPartySettingsInterface::getThirdPartySetting
ConfigEntityBase::getThirdPartySettings public function Gets all third-party settings of a given module. Overrides ThirdPartySettingsInterface::getThirdPartySettings
ConfigEntityBase::getTypedConfig protected function Gets the typed config manager.
ConfigEntityBase::hasTrustedData public function Gets whether on not the data is trusted. Overrides ConfigEntityInterface::hasTrustedData
ConfigEntityBase::invalidateTagsOnDelete protected static function Override to never invalidate the individual entities' cache tags; the
config system already invalidates them.
Overrides EntityBase::invalidateTagsOnDelete
ConfigEntityBase::invalidateTagsOnSave protected function Override to never invalidate the entity's cache tag; the config system
already invalidates it.
Overrides EntityBase::invalidateTagsOnSave
ConfigEntityBase::isInstallable public function Checks whether this entity is installable. Overrides ConfigEntityInterface::isInstallable 2
ConfigEntityBase::isNew public function Overrides Entity::isNew(). Overrides EntityBase::isNew
ConfigEntityBase::isUninstalling public function Returns whether this entity is being changed during the uninstall process. Overrides ConfigEntityInterface::isUninstalling
ConfigEntityBase::preDelete public static function Acts on entities before they are deleted and before hooks are invoked. Overrides EntityBase::preDelete 8
ConfigEntityBase::save public function Saves an entity permanently. Overrides EntityBase::save 2
ConfigEntityBase::set public function Sets the value of a property. Overrides ConfigEntityInterface::set
ConfigEntityBase::setOriginalId public function Sets the original ID. Overrides EntityBase::setOriginalId
ConfigEntityBase::setStatus public function Sets the status of the configuration entity. Overrides ConfigEntityInterface::setStatus
ConfigEntityBase::setThirdPartySetting public function Sets the value of a third-party setting. Overrides ThirdPartySettingsInterface::setThirdPartySetting
ConfigEntityBase::setUninstalling public function
ConfigEntityBase::sort public static function Helper callback for uasort() to sort configuration entities by weight and label. 6
ConfigEntityBase::status public function Returns whether the configuration entity is enabled. Overrides ConfigEntityInterface::status 4
ConfigEntityBase::toUrl public function Gets the URL object for the entity. Overrides EntityBase::toUrl
ConfigEntityBase::trustData public function Sets that the data should be trusted. Overrides ConfigEntityInterface::trustData
ConfigEntityBase::unsetThirdPartySetting public function Unsets a third-party setting. Overrides ThirdPartySettingsInterface::unsetThirdPartySetting
ConfigEntityBase::__construct public function Constructs an Entity object. Overrides EntityBase::__construct 10
ConfigEntityBase::__sleep public function Overrides EntityBase::__sleep 4
DependencySerializationTrait::$_entityStorages protected property
DependencySerializationTrait::$_serviceIds protected property
DependencySerializationTrait::__sleep public function Aliased as: traitSleep 1
DependencySerializationTrait::__wakeup public function 2
DependencyTrait::$dependencies protected property The object's dependencies.
DependencyTrait::addDependencies protected function Adds multiple dependencies.
DependencyTrait::addDependency protected function Adds a dependency. Aliased as: addDependencyTrait
EntityBase::$enforceIsNew protected property Boolean indicating whether the entity should be forced to be new.
EntityBase::$entityTypeId protected property The entity type.
EntityBase::$typedData protected property A typed data object wrapping this entity.
EntityBase::access public function Checks data value access. Overrides AccessibleInterface::access 1
EntityBase::bundle public function Gets the bundle of the entity. Overrides EntityInterface::bundle 1
EntityBase::create public static function Constructs a new entity object, without permanently saving it. Overrides EntityInterface::create 2
EntityBase::delete public function Deletes an entity permanently. Overrides EntityInterface::delete 1
EntityBase::enforceIsNew public function Enforces an entity to be new. Overrides EntityInterface::enforceIsNew
EntityBase::entityTypeBundleInfo protected function Gets the entity type bundle info service.
EntityBase::entityTypeManager protected function Gets the entity type manager.
EntityBase::getCacheContexts public function The cache contexts associated with this object. Overrides CacheableDependencyTrait::getCacheContexts
EntityBase::getCacheMaxAge public function The maximum age for which this object may be cached. Overrides CacheableDependencyTrait::getCacheMaxAge
EntityBase::getCacheTags public function The cache tags associated with this object. Overrides CacheableDependencyTrait::getCacheTags
EntityBase::getConfigDependencyKey public function Gets the key that is used to store configuration dependencies. Overrides EntityInterface::getConfigDependencyKey
EntityBase::getEntityType public function Gets the entity type definition. Overrides EntityInterface::getEntityType
EntityBase::getEntityTypeId public function Gets the ID of the type of the entity. Overrides EntityInterface::getEntityTypeId
EntityBase::getListCacheTagsToInvalidate protected function The list cache tags to invalidate for this entity.
EntityBase::getTypedData public function Gets a typed data object for this entity object. Overrides EntityInterface::getTypedData
EntityBase::getTypedDataClass private function Returns the typed data class name for this entity.
EntityBase::hasLinkTemplate public function Indicates if a link template exists for a given key. Overrides EntityInterface::hasLinkTemplate
EntityBase::label public function Gets the label of the entity. Overrides EntityInterface::label 6
EntityBase::language public function Gets the language of the entity. Overrides EntityInterface::language 1
EntityBase::languageManager protected function Gets the language manager.
EntityBase::linkTemplates protected function Gets an array link templates. 1
EntityBase::load public static function Loads an entity. Overrides EntityInterface::load
EntityBase::loadMultiple public static function Loads one or more entities. Overrides EntityInterface::loadMultiple
EntityBase::postCreate public function Acts on a created entity before hooks are invoked. Overrides EntityInterface::postCreate 5
EntityBase::postDelete public static function Acts on deleted entities before the delete hook is invoked. Overrides EntityInterface::postDelete 17
EntityBase::postLoad public static function Acts on loaded entities. Overrides EntityInterface::postLoad 3
EntityBase::preCreate public static function Changes the values of an entity before it is created. Overrides EntityInterface::preCreate 6
EntityBase::referencedEntities public function Gets a list of entities referenced by this entity. Overrides EntityInterface::referencedEntities 1
EntityBase::toLink public function Generates the HTML for a link to this entity. Overrides EntityInterface::toLink
EntityBase::uriRelationships public function Gets a list of URI relationships supported by this entity. Overrides EntityInterface::uriRelationships
EntityBase::urlRouteParameters protected function Gets an array of placeholders for this entity. 2
EntityBase::uuid public function Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface::uuid 1
EntityBase::uuidGenerator protected function Gets the UUID generator.
FilterFormat::$filterCollection protected property Holds the collection of filters that are attached to this format.
FilterFormat::$filters protected property Configured filters for this text format.
FilterFormat::$format protected property Unique machine name of the format.
FilterFormat::$name protected property Unique label of the text format.
FilterFormat::$roles protected property List of user role IDs to grant access to use this format on initial creation.
FilterFormat::$weight protected property Weight of this format in the text format selector.
FilterFormat::calculatePluginDependencies protected function Calculates and adds dependencies of a specific plugin instance. Overrides PluginDependencyTrait::calculatePluginDependencies
FilterFormat::disable public function Disables the configuration entity. Overrides ConfigEntityBase::disable
FilterFormat::filters public function Returns the ordered collection of filter plugin instances or an individual plugin instance. Overrides FilterFormatInterface::filters
FilterFormat::getFilterTypes public function Retrieves all filter types that are used in the text format. Overrides FilterFormatInterface::getFilterTypes
FilterFormat::getHtmlRestrictions public function Retrieve all HTML restrictions (tags and attributes) for the text format. Overrides FilterFormatInterface::getHtmlRestrictions
FilterFormat::getPermissionName public function Returns the machine-readable permission name for the text format. Overrides FilterFormatInterface::getPermissionName
FilterFormat::getPluginCollections public function
FilterFormat::id public function Gets the identifier. Overrides EntityBase::id
FilterFormat::isFallbackFormat public function Returns if this format is the fallback format. Overrides FilterFormatInterface::isFallbackFormat
FilterFormat::onDependencyRemoval public function Informs the entity that entities it depends on will be deleted. Overrides ConfigEntityBase::onDependencyRemoval
FilterFormat::postSave public function Acts on a saved entity before the insert or update hook is invoked. Overrides EntityBase::postSave
FilterFormat::preSave public function Acts on an entity before the presave hook is invoked. Overrides ConfigEntityBase::preSave
FilterFormat::removeFilter public function Removes a filter. Overrides FilterFormatInterface::removeFilter
FilterFormat::setFilterConfig public function Sets the configuration for a filter plugin instance. Overrides FilterFormatInterface::setFilterConfig
FilterFormat::toArray public function Gets an array of all property values. Overrides ConfigEntityBase::toArray
PluginDependencyTrait::getPluginDependencies protected function Calculates and returns dependencies of a specific plugin instance.
PluginDependencyTrait::moduleHandler protected function Wraps the module handler. 1
PluginDependencyTrait::themeHandler protected function Wraps the theme handler. 1
RefinableCacheableDependencyTrait::addCacheableDependency public function 1
RefinableCacheableDependencyTrait::addCacheContexts public function
RefinableCacheableDependencyTrait::addCacheTags public function
RefinableCacheableDependencyTrait::mergeCacheMaxAge public function
SynchronizableEntityTrait::$isSyncing protected property Is entity being created updated or deleted through synchronization process.
SynchronizableEntityTrait::isSyncing public function
SynchronizableEntityTrait::setSyncing public function

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