You are here

public function Container::hasDefinition in Service Container 7

Same name and namespace in other branches
  1. 7.2 src/DependencyInjection/Container.php \Drupal\service_container\DependencyInjection\Container::hasDefinition()

Indicates if a specific plugin definition exists.

Parameters

string $plugin_id: A plugin ID.

Return value

bool TRUE if the definition exists, FALSE otherwise.

Overrides DiscoveryInterface::hasDefinition

File

src/DependencyInjection/Container.php, line 58
Contains \Drupal\service_container\DependencyInjection\Container

Class

Container
Container is a DI container that provides services to users of the class.

Namespace

Drupal\service_container\DependencyInjection

Code

public function hasDefinition($plugin_id) {
  return isset($this->serviceDefinitions[$plugin_id]);
}