protected function EmailOverrideForm::getMappingDefaultValue in Easy Email 8
Same name and namespace in other branches
- 2.0.x modules/easy_email_override/src/Form/EmailOverrideForm.php \Drupal\easy_email_override\Form\EmailOverrideForm::getMappingDefaultValue()
Parameters
string $source_id:
Return value
string|null
1 call to EmailOverrideForm::getMappingDefaultValue()
- EmailOverrideForm::form in modules/
easy_email_override/ src/ Form/ EmailOverrideForm.php - Gets the actual form array to be built.
File
- modules/
easy_email_override/ src/ Form/ EmailOverrideForm.php, line 147
Class
- EmailOverrideForm
- Class EmailOverrideForm.
Namespace
Drupal\easy_email_override\FormCode
protected function getMappingDefaultValue($source_id) {
$default_value = NULL;
/** @var \Drupal\easy_email_override\Entity\EmailOverrideInterface $easy_email_override */
$easy_email_override = $this->entity;
$mappings = $easy_email_override
->getParamMap();
foreach ($mappings as $mapping) {
if ($source_id === $mapping['source']) {
$default_value = $mapping['destination'];
break;
}
}
return $default_value;
}