function template_preprocess_ctools_wizard_trail in Chaos Tool Suite (ctools) 8.3
Template Preprocess for Wizard Trail.
Parameters
$variables:
File
- ./
ctools.module, line 49 - Provides utility and helper APIs for Drupal developers and site builders.
Code
function template_preprocess_ctools_wizard_trail(&$variables) {
/** @var $wizard \Drupal\ctools\Wizard\FormWizardInterface|\Drupal\ctools\Wizard\EntityFormWizardInterface */
$wizard = $variables['wizard'];
$cached_values = $variables['cached_values'];
$trail = $variables['trail'];
$variables['step'] = $wizard
->getStep($cached_values);
foreach ($wizard
->getOperations($cached_values) as $step => $operation) {
$trail[$step] = !empty($operation['title']) ? $operation['title'] : '';
}
$variables['trail'] = $trail;
}