You are here

public function ThemeNegotiator::addNegotiator in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Theme/ThemeNegotiator.php \Drupal\Core\Theme\ThemeNegotiator::addNegotiator()

Adds a active theme negotiation service.

Parameters

\Drupal\Core\Theme\ThemeNegotiatorInterface $negotiator: The theme negotiator to add.

int $priority: Priority of the theme negotiator.

File

core/lib/Drupal/Core/Theme/ThemeNegotiator.php, line 61
Contains \Drupal\Core\Theme\ThemeNegotiator.

Class

ThemeNegotiator
Provides a class which determines the active theme of the page.

Namespace

Drupal\Core\Theme

Code

public function addNegotiator(ThemeNegotiatorInterface $negotiator, $priority) {
  $this->negotiators[$priority][] = $negotiator;

  // Force the negotiators to be re-sorted.
  $this->sortedNegotiators = NULL;
}