You are here

public function ImcePluginManager::getInstance in IMCE 8

Same name and namespace in other branches
  1. 8.2 src/ImcePluginManager.php \Drupal\imce\ImcePluginManager::getInstance()

Gets a preconfigured instance of a plugin.

Parameters

array $options: An array of options that can be used to determine a suitable plugin to instantiate and how to configure it.

Return value

object|false A fully configured plugin instance. The interface of the plugin instance will depend on the plugin type. If no instance can be retrieved, FALSE will be returned.

Overrides PluginManagerBase::getInstance

1 call to ImcePluginManager::getInstance()
ImcePluginManager::handleOperation in src/ImcePluginManager.php
Runs an operation handler for the file manager.

File

src/ImcePluginManager.php, line 66

Class

ImcePluginManager
Provides a plugin manager for Imce Plugins.

Namespace

Drupal\imce

Code

public function getInstance(array $options) {
  if (isset($options['id']) && ($id = $options['id'])) {
    return isset($this->instances[$id]) ? $this->instances[$id] : $this
      ->createInstance($id);
  }
}