You are here

protected function PatternDisplayFormTrait::getDefaultValue in UI Patterns 8

Helper function: get default value.

Parameters

array $configuration: Configuration.

string $field_name: Field name.

string $value: Value name.

Return value

string Field property value.

1 call to PatternDisplayFormTrait::getDefaultValue()
PatternDisplayFormTrait::getMappingForm in src/Form/PatternDisplayFormTrait.php
Get mapping form.

File

src/Form/PatternDisplayFormTrait.php, line 238

Class

PatternDisplayFormTrait
Trait PatternDisplayFormTrait.

Namespace

Drupal\ui_patterns\Form

Code

protected function getDefaultValue(array $configuration, $field_name, $value) {
  if (isset($configuration['pattern_mapping'][$field_name][$value])) {
    return $configuration['pattern_mapping'][$field_name][$value];
  }
  return NULL;
}