You are here

public function RestResponseDescribe::getFieldOptions in Salesforce Suite 8.3

Same name and namespace in other branches
  1. 8.4 src/Rest/RestResponseDescribe.php \Drupal\salesforce\Rest\RestResponseDescribe::getFieldOptions()
  2. 5.0.x src/Rest/RestResponseDescribe.php \Drupal\salesforce\Rest\RestResponseDescribe::getFieldOptions()

Return a one-dimensional array of field names => field labels.

Return value

array The field options.

File

src/Rest/RestResponseDescribe.php, line 159

Class

RestResponseDescribe
Class RestResponseDescribe.

Namespace

Drupal\salesforce\Rest

Code

public function getFieldOptions() {
  if (!isset($this->fieldOptions)) {
    $this->fieldOptions = array_column($this->fields, 'label', 'name');
    asort($this->fieldOptions);
  }
  return $this->fieldOptions;
}