function commerce_checkout_theme_suggestions_commerce_checkout_form in Commerce Core 8.2
Implements hook_theme_suggestions_HOOK().
File
- modules/
checkout/ commerce_checkout.module, line 58 - Provides configurable checkout flows.
Code
function commerce_checkout_theme_suggestions_commerce_checkout_form(array $variables) {
$original = $variables['theme_hook_original'];
$suggestions = [];
// If the checkout form has a sidebar, suggest the enhanced layout.
if (isset($variables['form']['sidebar']) && Element::isVisibleElement($variables['form']['sidebar'])) {
$suggestions[] = $original . '__with_sidebar';
}
return $suggestions;
}