function template_preprocess_webhook in Webhooks 8
Prepares variables for webhook templates.
Default template: webhook.html.twig.
Parameters
array $variables: An associative array containing:
- elements: An associative array containing the webhook information and any fields attached to the entity.
- attributes: HTML attributes for the containing element.
File
- modules/
webhook/ webhook.module, line 32 - Provides a webhook entity type.
Code
function template_preprocess_webhook(array &$variables) {
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
}
}