Drupal 8  8.0.2
FilterFormat Class Reference
Inheritance diagram for FilterFormat:

Public Member Functions

 id ()
 
 filters ($instance_id=NULL)
 
 getPluginCollections ()
 
 setFilterConfig ($instance_id, array $configuration)
 
 toArray ()
 
 disable ()
 
 preSave (EntityStorageInterface $storage)
 
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 isFallbackFormat ()
 
 getPermissionName ()
 
 getFilterTypes ()
 
 getHtmlRestrictions ()
 
 removeFilter ($instance_id)
 
 onDependencyRemoval (array $dependencies)
 
- Public Member Functions inherited from ConfigEntityBase
 __construct (array $values, $entity_type)
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 isNew ()
 
 get ($property_name)
 
 set ($property_name, $value)
 
 enable ()
 
 disable ()
 
 setStatus ($status)
 
 status ()
 
 setSyncing ($syncing)
 
 isSyncing ()
 
 setUninstalling ($uninstalling)
 
 isUninstalling ()
 
 createDuplicate ()
 
 preSave (EntityStorageInterface $storage)
 
 calculateDependencies ()
 
 urlInfo ($rel= 'edit-form', array $options=[])
 
 url ($rel= 'edit-form', $options=array())
 
 link ($text=NULL, $rel= 'edit-form', array $options=[])
 
 toUrl ($rel= 'edit-form', array $options=[])
 
 getCacheTagsToInvalidate ()
 
 getDependencies ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
 onDependencyRemoval (array $dependencies)
 
 setThirdPartySetting ($module, $key, $value)
 
 getThirdPartySetting ($module, $key, $default=NULL)
 
 getThirdPartySettings ($module)
 
 unsetThirdPartySetting ($module, $key)
 
 getThirdPartyProviders ()
 
 isInstallable ()
 
 trustData ()
 
 hasTrustedData ()
 
 save ()
 
- Public Member Functions inherited from Entity
 __construct (array $values, $entity_type)
 
 id ()
 
 uuid ()
 
 isNew ()
 
 enforceIsNew ($value=TRUE)
 
 getEntityTypeId ()
 
 bundle ()
 
 label ()
 
 urlInfo ($rel= 'canonical', array $options=[])
 
 toUrl ($rel= 'canonical', array $options=[])
 
 hasLinkTemplate ($rel)
 
 link ($text=NULL, $rel= 'canonical', array $options=[])
 
 toLink ($text=NULL, $rel= 'canonical', array $options=[])
 
 url ($rel= 'canonical', $options=array())
 
 uriRelationships ()
 
 access ($operation, AccountInterface $account=NULL, $return_as_object=FALSE)
 
 language ()
 
 save ()
 
 delete ()
 
 createDuplicate ()
 
 getEntityType ()
 
 preSave (EntityStorageInterface $storage)
 
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 postCreate (EntityStorageInterface $storage)
 
 referencedEntities ()
 
 getCacheContexts ()
 
 getCacheTagsToInvalidate ()
 
 getCacheTags ()
 
 getCacheMaxAge ()
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 toArray ()
 
 getTypedData ()
 
 __sleep ()
 
 getConfigDependencyKey ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
- Public Member Functions inherited from RefinableCacheableDependencyInterface
 addCacheContexts (array $cache_contexts)
 
 addCacheTags (array $cache_tags)
 
 mergeCacheMaxAge ($max_age)
 
 addCacheableDependency ($other_object)
 

Protected Member Functions

 calculatePluginDependencies (PluginInspectionInterface $instance)
 
- Protected Member Functions inherited from ConfigEntityBase
 getTypedConfig ()
 
 addDependency ($type, $name)
 
 invalidateTagsOnSave ($update)
 
- Protected Member Functions inherited from Entity
 entityManager ()
 
 entityTypeManager ()
 
 languageManager ()
 
 uuidGenerator ()
 
 linkTemplates ()
 
 urlRouteParameters ($rel)
 
 invalidateTagsOnSave ($update)
 

Protected Attributes

 $format
 
 $name
 
 $weight = 0
 
 $roles
 
 $filters = array()
 
 $filterCollection
 
- Protected Attributes inherited from ConfigEntityBase
 $originalId
 
 $pluginConfigKey
 
 $status = TRUE
 
 $uuid
 
 $langcode = 'en'
 
 $third_party_settings = array()
 
 $_core = []
 
 $trustedData = FALSE
 
- Protected Attributes inherited from Entity
 $entityTypeId
 
 $enforceIsNew
 
 $typedData
 

Additional Inherited Members

- Static Public Member Functions inherited from ConfigEntityBase
static sort (ConfigEntityInterface $a, ConfigEntityInterface $b)
 
- Static Public Member Functions inherited from Entity
static preCreate (EntityStorageInterface $storage, array &$values)
 
static preDelete (EntityStorageInterface $storage, array $entities)
 
static postDelete (EntityStorageInterface $storage, array $entities)
 
static postLoad (EntityStorageInterface $storage, array &$entities)
 
static load ($id)
 
static loadMultiple (array $ids=NULL)
 
static create (array $values=array())
 
- Static Protected Member Functions inherited from ConfigEntityBase
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 
static getConfigManager ()
 
- Static Protected Member Functions inherited from Entity
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 

Detailed Description

Represents a text format.

( id = "filter_format", label = ("Text format"), 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", } )

Member Function Documentation

calculatePluginDependencies ( PluginInspectionInterface  $instance)
protected

{}

disable ( )

{Disables the configuration entity.

Returns
$this
}

Implements ConfigEntityInterface.

References FilterFormat\isFallbackFormat(), and Drupal\moduleHandler().

Here is the call graph for this function:

filters (   $instance_id = NULL)

{Returns the ordered collection of filter plugin instances or an individual plugin instance.

Parameters
string$instance_id(optional) The ID of a filter plugin instance to return.
Returns
| Either the filter collection or a specific filter plugin instance.
}

Implements FilterFormatInterface.

References Drupal\service().

Referenced by FilterFormat\getFilterTypes(), FilterFormat\getHtmlRestrictions(), FilterFormat\getPluginCollections(), FilterFormat\preSave(), and FilterFormat\setFilterConfig().

Here is the call graph for this function:

Here is the caller graph for this function:

getFilterTypes ( )

{Retrieves all filter types that are used in the text format.

Returns
array All filter types used by filters of the text format.
}

Implements FilterFormatInterface.

References FilterFormat\filters().

Here is the call graph for this function:

getHtmlRestrictions ( )

{Retrieve all HTML restrictions (tags and attributes) for the text format.Note that restrictions applied to the "*" tag (the wildcard tag, i.e. all tags) are treated just like any other HTML tag. That means that any restrictions applied to it are not automatically applied to all other tags. It is up to the caller to handle this in whatever way it sees fit; this way no information granularity is lost.

Returns
array|FALSE A structured array as returned by FilterInterface::getHTMLRestrictions(), but with the intersection of all filters in this text format. Will either indicate blacklisting of tags or whitelisting of tags. In the latter case, it's possible that restrictions on attributes are also stored. FALSE means there are no HTML restrictions.
}

Implements FilterFormatInterface.

References FilterFormat\filters(), and FilterInterface\TYPE_HTML_RESTRICTOR.

Here is the call graph for this function:

getPermissionName ( )

{Returns the machine-readable permission name for the text format.

Returns
string|bool The machine-readable permission name, or FALSE if the text format is malformed or is the fallback format (which is available to all users).
}

Implements FilterFormatInterface.

References FilterFormat\id(), and FilterFormat\isFallbackFormat().

Referenced by FilterFormat\postSave().

Here is the call graph for this function:

Here is the caller graph for this function:

getPluginCollections ( )

{Gets the plugin collections used by this entity.

Returns
[] An array of plugin collections, keyed by the property name they use to store their configuration.
}

Implements EntityWithPluginCollectionInterface.

References FilterFormat\filters().

Here is the call graph for this function:

id ( )

{Gets the identifier.

Returns
string|int|null The entity identifier, or NULL if the object does not yet have an identifier.
}

Implements EntityInterface.

Referenced by FilterFormat\getPermissionName(), and FilterFormat\isFallbackFormat().

Here is the caller graph for this function:

isFallbackFormat ( )

Returns if this format is the fallback format.

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

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

Implements FilterFormatInterface.

References Drupal\config(), and FilterFormat\id().

Referenced by FilterFormat\disable(), and FilterFormat\getPermissionName().

Here is the call graph for this function:

Here is the caller graph for this function:

onDependencyRemoval ( array  $dependencies)

{Informs the entity that entities it depends on will be deleted.This method allows configuration entities to remove dependencies instead of being deleted themselves. Configuration entities can use this method to avoid being unnecessarily deleted during an extension uninstallation. For example, entity displays remove references to widgets and formatters if the plugin that supplies them depends on a module that is being uninstalled.If this method returns TRUE then the entity needs to be re-saved by the caller for the changes to take effect. Implementations should not save the entity.

Parameters
array$dependenciesAn array of dependencies that will be deleted keyed by dependency type. Dependency types are, for example, entity, module and theme.
Returns
bool TRUE if the entity has changed, FALSE if not.
bool TRUE if the entity has been changed as a result, FALSE if not.
See Also
::preDelete()
::uninstall()
::onDependencyRemoval()
}

Implements ConfigEntityInterface.

postSave ( EntityStorageInterface  $storage,
  $update = TRUE 
)

{}

References FilterFormat\getPermissionName(), and ConfigEntityBase\isSyncing().

Here is the call graph for this function:

preSave ( EntityStorageInterface  $storage)

{}

References FilterFormat\filters(), and Entity\label().

Here is the call graph for this function:

removeFilter (   $instance_id)

{Removes a filter.

Parameters
string$instance_idThe ID of a filter plugin to be removed.
}

Implements FilterFormatInterface.

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_idThe ID of a filter plugin to set the configuration for.
array$configurationThe filter plugin configuration to set.
}

Implements FilterFormatInterface.

References FilterFormat\filters().

Here is the call graph for this function:

toArray ( )

{Gets an array of all property values.

Returns
mixed[] An array of property values, keyed by property name.
}

Implements EntityInterface.


The documentation for this class was generated from the following file: