You are here

protected function AcceptanceMethodPluginManager::getPluginsListAsOptions in Entity Legal 8

Get plugin definition list as options usable in Form API.

Parameters

array $plugin_definition_list: The plugin definition list to convert.

Return value

array The plugin options keyed by ID and labeled using label.

2 calls to AcceptanceMethodPluginManager::getPluginsListAsOptions()
AcceptanceMethodPluginManager::getExistingUserPluginOptions in src/Plugin/AcceptanceMethodPluginManager.php
Get existing user plugin option list.
AcceptanceMethodPluginManager::getNewUserPluginOptions in src/Plugin/AcceptanceMethodPluginManager.php
Get new user plugin option list.

File

src/Plugin/AcceptanceMethodPluginManager.php, line 120
Contains \Drupal\entity_legal\Plugin\AcceptanceMethodPluginManager.

Class

AcceptanceMethodPluginManager
Plugin type manager for acceptance methods.

Namespace

Drupal\entity_legal\Plugin

Code

protected function getPluginsListAsOptions(array $plugin_definition_list) {
  $plugin_options = array();
  foreach ($plugin_definition_list as $plugin_definition) {
    $plugin_options[$plugin_definition['id']] = $plugin_definition['label']
      ->render();
  }
  return $plugin_options;
}