You are here

function flag_lists_theme in Flag Lists 8

Same name and namespace in other branches
  1. 6 flag_lists.module \flag_lists_theme()
  2. 7.3 flag_lists.module \flag_lists_theme()
  3. 7 flag_lists.module \flag_lists_theme()
  4. 4.0.x flag_lists.module \flag_lists_theme()

Implements hook_theme().

File

./flag_lists.module, line 83
Contains flag_lists.module.

Code

function flag_lists_theme($existing, $type, $theme, $path) {
  $theme = [];

  // Used for viewing flagging collections.
  $theme['flagging_collection'] = [
    'render element' => 'elements',
    'file' => 'flagging_collection.page.inc',
    'template' => 'flagging_collection',
  ];
  $theme['flagging_collection_content_add_list'] = [
    'render element' => 'content',
    'variables' => [
      'content' => NULL,
    ],
    'file' => 'flagging_collection.page.inc',
  ];

  // Not used in a normal flag_list_item implementation.
  $theme['flag_lists'] = [
    'render element' => 'children',
  ];

  // Used when creating flag and flag links.
  // The difference between flag and flag lists is handled in the twig.
  $theme['flag'] = [
    'template' => 'flag_list_flag',
    'base hook' => 'flag',
  ];
  return $theme;
}