You are here

public function SalesforceAuthConfig::getPluginsAsOptions in Salesforce Suite 8.3

Same name and namespace in other branches
  1. 8.4 src/Entity/SalesforceAuthConfig.php \Drupal\salesforce\Entity\SalesforceAuthConfig::getPluginsAsOptions()
  2. 5.0.x src/Entity/SalesforceAuthConfig.php \Drupal\salesforce\Entity\SalesforceAuthConfig::getPluginsAsOptions()

Returns a list of plugins, for use in forms.

Return value

array The list of plugins, indexed by ID.

File

src/Entity/SalesforceAuthConfig.php, line 135

Class

SalesforceAuthConfig
Defines a Salesforce Auth entity.

Namespace

Drupal\salesforce\Entity

Code

public function getPluginsAsOptions() {
  $options = [
    '' => t('- Select -'),
  ];
  foreach ($this
    ->authManager()
    ->getDefinitions() as $id => $definition) {
    $options[$id] = $definition['label'];
  }
  return $options;
}