You are here

protected function AuthorizationProfileForm::getConsumerOptions in Authorization 8

Returns all available Consumer plugins, as an options list.

Return value

string[] An associative array mapping Consumer plugin IDs to their (HTML-escaped) labels.

2 calls to AuthorizationProfileForm::getConsumerOptions()
AuthorizationProfileForm::buildConsumerConfigForm in src/Form/AuthorizationProfileForm.php
Builds the consumer-specific configuration form.
AuthorizationProfileForm::buildEntityForm in src/Form/AuthorizationProfileForm.php
Builds the form for the basic server properties.

File

src/Form/AuthorizationProfileForm.php, line 347

Class

AuthorizationProfileForm
Authorization profile form.

Namespace

Drupal\authorization\Form

Code

protected function getConsumerOptions() : array {
  $options = [];
  foreach ($this
    ->getConsumerPluginManager()
    ->getDefinitions() as $plugin_id => $plugin_definition) {
    $options[$plugin_id] = Html::escape($plugin_definition['label']);
  }
  return $options;
}