You are here

public function ThemeEvent::addNewThemes in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/core_event_dispatcher/src/Event/Theme/ThemeEvent.php \Drupal\core_event_dispatcher\Event\Theme\ThemeEvent::addNewThemes()

Add new themes.

Have a look at the return statement.

Parameters

array $themes: The new theme information.

Throws

\RuntimeException

See also

\hook_theme()

File

modules/core_event_dispatcher/src/Event/Theme/ThemeEvent.php, line 106

Class

ThemeEvent
Class ThemeEvent.

Namespace

Drupal\core_event_dispatcher\Event\Theme

Code

public function addNewThemes(array $themes) {
  foreach ($themes as $theme => $information) {
    $this
      ->addNewTheme($theme, $information);
  }
}