You are here

protected function SimplifyAdminForm::getFormValue in Simplify 8

Gets an array representing the configuration form values.

Parameters

Drupal\Core\Form\FormStateInterface $form_state: The form state array.

string $config_name: The configuration name to be retrieved.

Return value

array An array representing the configuration or empty array if the configuration is not applicable.

File

src/Form/SimplifyAdminForm.php, line 207

Class

SimplifyAdminForm
Configure simplify global configurations.

Namespace

Drupal\simplify\Form

Code

protected function getFormValue(FormStateInterface $form_state, $config_name) {
  $value = $form_state
    ->getValue($config_name);
  return !empty($value) ? $value : [];
}