You are here

public function CToolsPluginDiscovery::hasDefinition in Service Container 7.2

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

Class

CToolsPluginDiscovery
A discovery mechanism that uses ctools plugins for Drupal 7 compatibility.

Namespace

Drupal\service_container\Plugin\Discovery

Code

public function hasDefinition($plugin_id) {
  return (bool) $this
    ->getDefinition($plugin_id, FALSE);
}