You are here

function hook_ui_patterns_suggestions_alter in UI Patterns 8

Provide hook theme suggestions for patterns.

See also

ui_patterns_theme_suggestions_alter()

5 functions implement hook_ui_patterns_suggestions_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

ui_patterns_ds_ui_patterns_suggestions_alter in modules/ui_patterns_ds/ui_patterns_ds.module
Implements hook_ui_patterns_suggestions_alter().
ui_patterns_field_group_ui_patterns_suggestions_alter in modules/ui_patterns_field_group/ui_patterns_field_group.module
Implements hook_ui_patterns_suggestions_alter().
ui_patterns_layouts_ui_patterns_suggestions_alter in modules/ui_patterns_layouts/ui_patterns_layouts.module
Implements hook_ui_patterns_suggestions_alter().
ui_patterns_ui_patterns_suggestions_alter in ./ui_patterns.module
Implements hook_ui_patterns_suggestions_alter().
ui_patterns_views_ui_patterns_suggestions_alter in modules/ui_patterns_views/ui_patterns_views.module
Implements hook_ui_patterns_suggestions_alter().
1 invocation of hook_ui_patterns_suggestions_alter()
ui_patterns_theme_suggestions_alter in ./ui_patterns.module
Implements hook_theme_suggestions_HOOK_alter().

File

./ui_patterns.api.php, line 36
API file.

Code

function hook_ui_patterns_suggestions_alter(array &$suggestions, array $variables, PatternContext $context) {
  if ($context
    ->isOfType('views_row')) {
    $hook = $variables['theme_hook_original'];
    $view_name = $context
      ->getProperty('view_name');
    $display = $context
      ->getProperty('display');
    $suggestions[] = $hook . '__views_row__' . $view_name;
    $suggestions[] = $hook . '__views_row__' . $view_name . '__' . $display;
  }
}