You are here

function skinr_theme_hooks in Skinr 8.2

Same name and namespace in other branches
  1. 7.2 skinr.module \skinr_theme_hooks()

Provide a list of all available theme hooks for a given element.

Parameters

$module: The module implementing given element.

$element: An element.

Return value

An array of theme hooks.

2 calls to skinr_theme_hooks()
skinr_ui_element_is_skinable in skinr_ui/skinr_ui.module
Fetch all theme_hooks that are compatible with active skins.
SkinsEditForm::buildForm in skinr_ui/src/Form/SkinsEditForm.php
Form constructor.
1 string reference to 'skinr_theme_hooks'
skinr_hook_info in ./skinr.module
Implements hook_hook_info().

File

./skinr.module, line 1264
Handles core Skinr functionality.

Code

function skinr_theme_hooks($module, $element) {
  $theme_hooks =& drupal_static(__FUNCTION__, array());
  if (!isset($theme_hooks[$module][$element])) {

    // Invoke hook_skinr_theme_hooks() and hook_skinr_theme_hooks_alter().
    $theme_hooks[$module][$element] = skinr_invoke_all('skinr_theme_hooks', $module, $element);
    \Drupal::moduleHandler()
      ->alter('skinr_theme_hooks', $theme_hooks[$module][$element], $module, $element);
  }
  return $theme_hooks[$module][$element];
}