You are here

public function Generic::addProvider in Core Context 8

Adds a provider service from which to expose contexts.

Parameters

\Drupal\Core\Plugin\Context\ContextProviderInterface $provider: The context provider to add.

File

src/ContextProvider/Generic.php, line 25

Class

Generic
Exposes contexts from various provider services, under a single namespace.

Namespace

Drupal\core_context\ContextProvider

Code

public function addProvider(ContextProviderInterface $provider) {
  array_push($this->providers, $provider);
}