You are here

public static function LayouterTextFormat::preRender in Layouter - WYSIWYG layout templates 8

Sets layouter template on field.

File

src/LayouterTextFormat.php, line 19

Class

LayouterTextFormat
Provides a trusted callback.

Namespace

Drupal\layouter

Code

public static function preRender($element) {
  if (isset($element['value'])) {
    $element['value'] = self::layouterLoadByField($element['value']);
  }
  else {
    $element = self::layouterLoadByField($element);
  }
  return $element;
}