You are here

public function TfaLoginPluginManager::getDefinition in Two-factor Authentication (TFA) 8

Provide some backwards compatibility with the old implicit setupPluginId. This will give other modules more time to update their plugins.

Overrides DiscoveryCachedTrait::getDefinition

Deprecated

in tfa:8.x-1.0-alpha7 and is removed from tfa:8.x-2.0. Please specify the setupPluginId property in the plugin annotation.

See also

https://www.drupal.org/project/tfa/issues/2925066

1 call to TfaLoginPluginManager::getDefinition()
TfaLoginPluginManager::createInstance in src/TfaLoginPluginManager.php
Create an instance of a plugin.

File

src/TfaLoginPluginManager.php, line 159

Class

TfaLoginPluginManager
The login plugin manager.

Namespace

Drupal\tfa

Code

public function getDefinition($plugin_id, $exception_on_invalid = TRUE) {
  $plugin = parent::getDefinition($plugin_id, $exception_on_invalid);
  if (is_array($plugin) && empty($plugin['setupPluginId'])) {
    $plugin['setupPluginId'] = $plugin_id . '_setup';
  }
  return $plugin;
}