function commerce_license_theme_suggestions_commerce_license in Commerce License 8.2
Implements hook_theme_suggestions_HOOK().
File
- ./
commerce_license.module, line 175 - Contains commerce_license.module.
Code
function commerce_license_theme_suggestions_commerce_license(array $variables) {
$suggestions = [];
$entity = $variables['elements']['#commerce_license'];
$sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_');
$suggestions[] = 'commerce_license__' . $sanitized_view_mode;
$suggestions[] = 'commerce_license__' . $entity
->bundle();
$suggestions[] = 'commerce_license__' . $entity
->bundle() . '__' . $sanitized_view_mode;
$suggestions[] = 'commerce_license__' . $entity
->id();
$suggestions[] = 'commerce_license__' . $entity
->id() . '__' . $sanitized_view_mode;
return $suggestions;
}