function template_preprocess_import_entity in Content Synchronizer 8
Same name and namespace in other branches
- 8.2 import_entity.page.inc \template_preprocess_import_entity()
- 3.x import_entity.page.inc \template_preprocess_import_entity()
Prepares variables for Import templates.
Default template: import_entity.html.twig.
Parameters
array $variables: An associative array containing:
- elements: An associative array containing the user information and any
- attributes: HTML attributes for the containing element.
File
- ./
import_entity.page.inc, line 22 - Contains import_entity.page.inc.
Code
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];
}
}