Drupal 8  8.0.2
Editor Class Reference
Inheritance diagram for Editor:

Public Member Functions

 isCompatible (FieldItemListInterface $items)
 
 getMetadata (FieldItemListInterface $items)
 
 getAttachments ()
 
- Public Member Functions inherited from PluginBase
 __construct (array $configuration, $plugin_id, $plugin_definition)
 
 getPluginId ()
 
 getBaseId ()
 
 getDerivativeId ()
 
 getPluginDefinition ()
 

Protected Member Functions

 textFormatHasTransformationFilters ($format_id)
 

Additional Inherited Members

- Data Fields inherited from PluginBase
const DERIVATIVE_SEPARATOR = ':'
 
- Protected Attributes inherited from PluginBase
 $pluginId
 
 $pluginDefinition
 
 $configuration
 

Detailed Description

Defines the formatted text in-place editor.

( id = "editor", alternativeTo = {"plain_text"} )

Member Function Documentation

getAttachments ( )

{Returns the attachments for this editor.

Returns
array An array of attachments, for use with #attached.
See Also
::processAttachments()
}

Implements InPlaceEditorInterface.

References Drupal\currentUser(), and Drupal\service().

Here is the call graph for this function:

getMetadata ( FieldItemListInterface  $items)

{Generates metadata that is needed specifically for this editor.Will only be called by ::generate() when the passed in field & item values will use this editor.

Parameters
\Drupal\Core\Field\FieldItemListInterface$itemsThe field values to be in-place edited.
Returns
array A keyed array with metadata. Each key should be prefixed with the plugin ID of the editor.
}

Implements InPlaceEditorInterface.

References Editor\textFormatHasTransformationFilters().

Here is the call graph for this function:

isCompatible ( FieldItemListInterface  $items)

{Checks whether this in-place editor is compatible with a given field.

Parameters
\Drupal\Core\Field\FieldItemListInterface$itemsThe field values to be in-place edited.
Returns
bool TRUE if it is compatible, FALSE otherwise.
}

Implements InPlaceEditorInterface.

References FieldItemListInterface\getFieldDefinition(), and Drupal\service().

Here is the call graph for this function:

textFormatHasTransformationFilters (   $format_id)
protected

Returns whether the text format has transformation filters.

Parameters
int$format_idA text format ID.
Returns
bool

References FilterInterface\TYPE_TRANSFORM_IRREVERSIBLE, and FilterInterface\TYPE_TRANSFORM_REVERSIBLE.

Referenced by Editor\getMetadata().

Here is the caller graph for this function:


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