protected function AcquiadamConfig::getFieldValue in Media: Acquia DAM 8
Gets a form field value, either from the form or from config.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The form state object.
string $field_name: The key of the field in config. (This may differ from form field key).
Return value
mixed The value for the given form field, or NULL.
1 call to AcquiadamConfig::getFieldValue()
- AcquiadamConfig::validateForm in src/Form/ AcquiadamConfig.php 
- Form validation handler.
File
- src/Form/ AcquiadamConfig.php, line 440 
Class
- AcquiadamConfig
- Class AcquiadamConfig.
Namespace
Drupal\media_acquiadam\FormCode
protected function getFieldValue(FormStateInterface $form_state, $field_name) {
  // If the user has entered a value use it, if not check config.
  $value = $form_state
    ->getValue($field_name) ?: $this
    ->getFormValueFromConfig($field_name);
  return $value;
}