Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LazyPluginCollection.php

function LazyPluginCollection::has

Determines if a plugin instance exists.

Parameters

string $instance_id: The ID of the plugin instance to check.

Return value

bool TRUE if the plugin instance exists, FALSE otherwise.

File

core/lib/Drupal/Component/Plugin/LazyPluginCollection.php, line 68

Class

LazyPluginCollection
Defines an object which stores multiple plugin instances to lazy load them.

Namespace

Drupal\Component\Plugin

Code

public function has($instance_id) {
    return isset($this->pluginInstances[$instance_id]) || isset($this->instanceIds[$instance_id]);
}
RSS feed
Powered by Drupal