You are here

function apigee_edge_theme_suggestions_apigee_entity_list in Apigee Edge 8

Implements hook_theme_suggestions_HOOK().

File

./apigee_edge.module, line 218
Copyright 2018 Google Inc.

Code

function apigee_edge_theme_suggestions_apigee_entity_list(array $variables) {
  $suggestions = [];
  $view_mode = $variables['elements']['#view_mode'];
  $entity_type_id = $variables['elements']['#entity_type']
    ->id();

  // Add a suggestion based on the entity type and on the view mode.
  $suggestions[] = 'apigee_entity_list__' . $entity_type_id;
  $suggestions[] = 'apigee_entity_list__' . $entity_type_id . '__' . $view_mode;
  return $suggestions;
}