function quantity_theme_suggestions_quantity in farmOS 2.x
Implements hook_theme_suggestions_HOOK().
File
- modules/
core/ quantity/ quantity.module, line 183 - Quantity module.
Code
function quantity_theme_suggestions_quantity(array $variables) {
$suggestions = [];
$quantity = $variables['elements']['#quantity'];
$sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_');
$suggestions[] = 'quantity__' . $sanitized_view_mode;
$suggestions[] = 'quantity__' . $quantity
->bundle();
$suggestions[] = 'quantity__' . $quantity
->bundle() . '__' . $sanitized_view_mode;
$suggestions[] = 'quantity__' . $quantity
->id();
$suggestions[] = 'quantity__' . $quantity
->id() . '__' . $sanitized_view_mode;
return $suggestions;
}