function redhen_connection_theme_suggestions_redhen_connection in RedHen CRM 8
Implements hook_theme_suggestions_HOOK().
File
- modules/
redhen_connection/ redhen_connection.module, line 68 - Contains redhen_connection.module..
Code
function redhen_connection_theme_suggestions_redhen_connection(array $variables) {
$suggestions = [];
$connection = $variables['elements']['#redhen_connection'];
$sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_');
$suggestions[] = 'redhen_connection__' . $sanitized_view_mode;
$suggestions[] = 'redhen_connection__' . $connection
->getType();
$suggestions[] = 'redhen_connection__' . $connection
->getType() . '__' . $sanitized_view_mode;
$suggestions[] = 'redhen_connection__' . $connection
->id();
$suggestions[] = 'redhen_connection__' . $connection
->id() . '__' . $sanitized_view_mode;
return $suggestions;
}