You are here

public function ContainerAwarePluginManager::hasDefinition in Service Container 7.2

Same name and namespace in other branches
  1. 7 src/Plugin/ContainerAwarePluginManager.php \Drupal\service_container\Plugin\ContainerAwarePluginManager::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/Plugin/ContainerAwarePluginManager.php, line 54
Contains \Drupal\service_container\Plugin\ContainerAwarePluginManager

Class

ContainerAwarePluginManager
Base class for plugin managers.

Namespace

Drupal\service_container\Plugin

Code

public function hasDefinition($plugin_id) {
  return $this->container
    ->hasDefinition($this->servicePrefix . $plugin_id);
}