You are here

protected function CivicrmOptions::getFieldOptions in Webform CiviCRM Integration 8.5

2 calls to CivicrmOptions::getFieldOptions()
CivicrmOptions::getConfigurationFormProperties in src/Plugin/WebformElement/CivicrmOptions.php
Get an associative array of element properties from configuration webform.
CivicrmOptions::prepare in src/Plugin/WebformElement/CivicrmOptions.php
Prepare an element to be rendered within a webform.

File

src/Plugin/WebformElement/CivicrmOptions.php, line 208

Class

CivicrmOptions
Provides a 'civicrm_options' element.

Namespace

Drupal\webform_civicrm\Plugin\WebformElement

Code

protected function getFieldOptions($element, $data = []) {
  \Drupal::getContainer()
    ->get('civicrm')
    ->initialize();
  $field_options = \Drupal::service('webform_civicrm.field_options');
  return $field_options
    ->get([
    'form_key' => $element['#form_key'],
  ], 'create', $data);
}