class Element implements TrustedCallbackInterface (View source)

Defines a service for Text Editor's render elements.

Properties

protected PluginManagerInterface $pluginManager

The Text Editor plugin manager service.

Methods

__construct(PluginManagerInterface $plugin_manager)

Constructs a new Element object.

static string[]
trustedCallbacks()

Lists the trusted callbacks provided by the implementing class.

preRenderTextFormat(array $element)

Additional #pre_render callback for 'text_format' elements.

Details

__construct(PluginManagerInterface $plugin_manager)

Constructs a new Element object.

Parameters

PluginManagerInterface $plugin_manager

The Text Editor plugin manager service.

static string[] trustedCallbacks()

Lists the trusted callbacks provided by the implementing class.

Trusted callbacks are public methods on the implementing class and can be invoked via \Drupal\Core\Security\DoTrustedCallbackTrait::doTrustedCallback().

Return Value

string[]

List of method names implemented by the class that can be used as trusted callbacks.

preRenderTextFormat(array $element)

Additional #pre_render callback for 'text_format' elements.

Parameters

array $element