You are here

function template_preprocess_entity_embed_container in Entity Embed 8

Prepares variables for entity embed container templates.

Default template: entity-embed-container.html.twig.

Parameters

array $variables: An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #attributes, #children.

File

./entity_embed.module, line 54
Framework for allowing entities to be embedded in CKEditor.

Code

function template_preprocess_entity_embed_container(array &$variables) {
  $variables['element'] += [
    '#attributes' => [],
  ];
  $variables['attributes'] = $variables['element']['#attributes'];
  $variables['children'] = $variables['element']['#children'];
}