TextProcessed

A computed property for processing text with a format. Required settings (below the definition's 'settings' key) are: text source: The text property containing the to be processed text. Hierarchy class \Drupal\Core\TypedData\TypedData implements PluginInspectionInterface, TypedDataInterface uses StringTranslationTrait, TypedDataTraitclass \Drupal\text\TextProcessed File core/modules/text/src/TextProcessed.php, line 15 Namespace Drupal\text Members Name Modifiers Type Descrip

TextFormat::processFormat

public static TextFormat::processFormat(&$element, FormStateInterface $form_state, &$complete_form) Expands an element into a base element with text format selector attached. The form element will be expanded into two separate form elements, one holding the original element, and the other holding the text format selector: value: Holds the original element, having its #type changed to the value of #base_type or 'textarea' by default. format: Holds the text format details and the text f

TextFormat::getTranslationElement

public TextFormat::getTranslationElement(LanguageInterface $translation_language, $source_config, $translation_config) Returns the translation form element for a given configuration definition. For complex data structures (such as mappings) that are translatable wholesale but contain non-translatable properties, the form element is responsible for checking access to the source value of those properties. In case of formatted text, for example, access to the source text format must be checked. If

TextFormat::getSourceElement

public TextFormat::getSourceElement(LanguageInterface $source_language, $source_config) Returns the source element for a given configuration definition. This can be either a render array that actually outputs the source values directly or a read-only form element with the source values depending on what is considered to provide a more intuitive user interface for the translator. Parameters \Drupal\Core\Language\LanguageInterface $source_language: Thee source language of the configuration objec

TextFormat::getInfo

public TextFormat::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides ElementInterface::getInfo File core/modules/filter/src/Element/TextFormat.php, line 41 Class TextFormat Provides a text format render element. Namespace Drupal\filter\Element Code public function

TextFormat::elementInfo

protected static TextFormat::elementInfo() Wraps the element info service. Return value \Drupal\Core\Render\ElementInfoManagerInterface File core/modules/filter/src/Element/TextFormat.php, line 273 Class TextFormat Provides a text format render element. Namespace Drupal\filter\Element Code protected static function elementInfo() { return \Drupal::service('element_info'); }

TextFormat::currentUser

protected static TextFormat::currentUser() Wraps the current user. \Drupal\Core\Session\AccountInterface File core/modules/filter/src/Element/TextFormat.php, line 255 Class TextFormat Provides a text format render element. Namespace Drupal\filter\Element Code protected static function currentUser() { return \Drupal::currentUser(); }

TextFormat::configFactory

protected static TextFormat::configFactory() Wraps the config factory. Return value \Drupal\Core\Config\ConfigFactoryInterface File core/modules/filter/src/Element/TextFormat.php, line 264 Class TextFormat Provides a text format render element. Namespace Drupal\filter\Element Code protected static function configFactory() { return \Drupal::configFactory(); }

TextFormat

Defines the text_format element for the configuration translation interface. Hierarchy class \Drupal\config_translation\FormElement\FormElementBase implements ElementInterface uses StringTranslationTraitclass \Drupal\config_translation\FormElement\TextFormat File core/modules/config_translation/src/FormElement/TextFormat.php, line 10 Namespace Drupal\config_translation\FormElement Members Name Modifiers Type Description FormElementBase::$definition protected property Th

TextFormat

Provides a text format render element. Properties: #base_type: The form element #type to use for the 'value' element. 'textarea' by default. #format: (optional) The text format ID to preselect. If omitted, the default format for the current user will be used. #allowed_formats: (optional) An array of text format IDs that are available for this element. If omitted, all text formats that the current user has access to will be allowed. Usage Example: $form['body'] = array( '#type' => 'tex