You are here

import_entity.page.inc in Content Synchronizer 8.2

Same filename and directory in other branches
  1. 8 import_entity.page.inc
  2. 3.x import_entity.page.inc

Contains import_entity.page.inc.

Page callback for Import entities.

File

import_entity.page.inc
View source
<?php

/**
 * @file
 * Contains import_entity.page.inc.
 *
 * Page callback for Import entities.
 */
use Drupal\Core\Render\Element;

/**
 * Prepares variables for Import templates.
 *
 * Default template: import_entity.html.twig.
 *
 * @param array $variables
 *   An associative array containing:
 *   - elements: An associative array containing the user information and any
 *   - attributes: HTML attributes for the containing element.
 */
function template_preprocess_import_entity(array &$variables) {

  // Fetch ImportEntity Entity Object.
  $import_entity = $variables['elements']['#import_entity'];

  // Helpful $content variable for templates.
  foreach (Element::children($variables['elements']) as $key) {
    $variables['content'][$key] = $variables['elements'][$key];
  }
}

Functions

Namesort descending Description
template_preprocess_import_entity Prepares variables for Import templates.