function commerce_variation_add_to_cart_theme in Commerce Variation Add to Cart 8
Implements hook_theme().
File
- ./
commerce_variation_add_to_cart.module, line 11 - Pass variables to Twig template.
Code
function commerce_variation_add_to_cart_theme() {
return [
'variation_add_to_cart_formatter' => [
'variables' => [
'variation' => NULL,
'product_id' => NULL,
'variation_id' => NULL,
'show_title' => NULL,
'title' => NULL,
'show_price' => NULL,
'price_number' => NULL,
'price_format' => NULL,
'show_currency' => NULL,
'price_currency' => NULL,
'show_quantity' => NULL,
'attributes' => [],
'destination' => NULL,
],
],
];
}