Drupal 8  8.0.2
EditorController Class Reference
Inheritance diagram for EditorController:

Public Member Functions

 getUntransformedText (EntityInterface $entity, $field_name, $langcode, $view_mode_id)
 
 filterXss (Request $request, FilterFormatInterface $filter_format)
 

Detailed Description

Returns responses for Editor module routes.

Member Function Documentation

filterXss ( Request  $request,
FilterFormatInterface  $filter_format 
)

Apply the necessary XSS filtering for using a certain text format's editor.

Parameters
\Symfony\Component\HttpFoundation\Request$requestThe current request object.
\Drupal\filter\FilterFormatInterface$filter_formatThe text format whose text editor (if any) will be used.
Returns
A JSON response containing the XSS-filtered value.
Exceptions
\Symfony\Component\HttpKernel\Exception\NotFoundHttpExceptionThrown if no value to filter is specified.
See Also
editor_filter_xss()

References Drupal\entityManager().

Here is the call graph for this function:

getUntransformedText ( EntityInterface  $entity,
  $field_name,
  $langcode,
  $view_mode_id 
)

Returns an Ajax response to render a text field without transformation filters.

Parameters
\Drupal\Core\Entity\EntityInterface$entityThe entity of which a formatted text field is being rerendered.
string$field_nameThe name of the (formatted text) field that is being rerendered
string$langcodeThe name of the language for which the formatted text field is being rerendered.
string$view_mode_idThe view mode the formatted text field should be rerendered in.
Returns
The Ajax response.

References FilterInterface\TYPE_TRANSFORM_IRREVERSIBLE, and FilterInterface\TYPE_TRANSFORM_REVERSIBLE.


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