You are here

public function UiPatternsManager::getPatterns in UI Patterns 8

Get pattern objects.

Return value

\Drupal\ui_patterns\Plugin\PatternBase[] Pattern objects.

File

src/UiPatternsManager.php, line 52

Class

UiPatternsManager
Provides the default ui_patterns manager.

Namespace

Drupal\ui_patterns

Code

public function getPatterns() {
  $patterns = [];
  foreach ($this
    ->getDefinitions() as $definition) {
    $patterns[] = $this
      ->getFactory()
      ->createInstance($definition
      ->id());
  }
  return $patterns;
}