You are here

public function TfaSendPluginManager::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

File

src/TfaSendPluginManager.php, line 61

Class

TfaSendPluginManager
The send 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;
}