This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/vendor/chi-teck/drupal-code-generator/templates/d7/hook/process.twig
2018-11-23 12:29:20 +00:00

17 lines
629 B
Twig

/**
* Implements hook_process().
*/
function {{ machine_name }}_process(&$variables, $hook) {
// Wraps variables in RDF wrappers.
if (!empty($variables['rdf_template_variable_attributes_array'])) {
foreach ($variables['rdf_template_variable_attributes_array'] as $variable_name => $attributes) {
$context = array(
'hook' => $hook,
'variable_name' => $variable_name,
'variables' => $variables,
);
$variables[$variable_name] = theme('rdf_template_variable_wrapper', array('content' => $variables[$variable_name], 'attributes' => $attributes, 'context' => $context));
}
}
}