You are here

public function UiPatternsManager::isPatternHook in UI Patterns 8

File

src/UiPatternsManager.php, line 93

Class

UiPatternsManager
Provides the default ui_patterns manager.

Namespace

Drupal\ui_patterns

Code

public function isPatternHook($hook) {

  // Improve performance on not cached pages.
  if (empty($this->patternHooks)) {
    foreach ($this
      ->getDefinitions() as $definition) {
      $this->patternHooks[$definition
        ->getThemeHook()] = $definition
        ->getThemeHook();
    }
  }
  return !empty($this->patternHooks[$hook]);
}