You are here

protected function SettingsForm::getVersionOptions in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 src/Form/SettingsForm.php \Drupal\salesforce\Form\SettingsForm::getVersionOptions()
  2. 5.0.x src/Form/SettingsForm.php \Drupal\salesforce\Form\SettingsForm::getVersionOptions()

Helper method to generate Salesforce option list for select element.

Return value

array The version options.

1 call to SettingsForm::getVersionOptions()
SettingsForm::buildForm in src/Form/SettingsForm.php
Form constructor.

File

src/Form/SettingsForm.php, line 230

Class

SettingsForm
Creates authorization form for Salesforce.

Namespace

Drupal\salesforce\Form

Code

protected function getVersionOptions() {
  $versions = $this->client
    ->getVersions();
  array_walk($versions, function (&$item, $key) {
    $item = $item['label'];
  });
  return $versions;
}