You are here

public function StylePluginManager::getThemeImplementations in Styles API 8

Get theme implementations.

Return value

array An associative array of the same format as returned by hook_theme().

Overrides StylePluginManagerInterface::getThemeImplementations

See also

hook_theme()

File

src/Plugin/Style/StylePluginManager.php, line 115
Contains \Drupal\styles_api\Plugin\Style\StylePluginManager.

Class

StylePluginManager
Plugin type manager for all styles.

Namespace

Drupal\styles_api\Plugin\Style

Code

public function getThemeImplementations() {
  $plugins = $this
    ->getDefinitions();
  $theme_registry = [];
  foreach ($plugins as $id => $definition) {
    if (!empty($definition['configuration']['path'])) {
      $theme_registry[$id] = $definition['configuration'];
    }
  }
  return $theme_registry;
}