You are here

function ui_patterns_theme in UI Patterns 8

Implements hook_theme().

File

./ui_patterns.module, line 14
Contains ui_patterns.module.

Code

function ui_patterns_theme() {

  /** @var \Drupal\ui_patterns\Plugin\PatternBase $pattern */
  $items = [
    'patterns_destination' => [
      'variables' => [
        'sources' => NULL,
        'context' => NULL,
      ],
    ],
    'patterns_use_wrapper' => [
      'variables' => [
        'use' => NULL,
      ],
    ],
  ];
  foreach (UiPatterns::getManager()
    ->getPatterns() as $pattern) {
    $items += $pattern
      ->getThemeImplementation();
  }
  return $items;
}