}
}
+ /**
+ * @param string|int $id
+ * @return \Civi\ActionSchedule\Mapping|NULL
+ */
+ public static function getMapping($id) {
+ $mappings = self::getMappings();
+ return isset($mappings[$id]) ? $mappings[$id] : NULL;
+ }
+
/**
* Retrieve list of selections/drop downs for Scheduled Reminder form
*
foreach ($mappings as $mapping) {
/** @var \Civi\ActionSchedule\Mapping $mapping */
$entityValueLabels[$mapping->getId()] = $mapping->getValueLabels();
- // Not sure why: everything *except* contact-dates have a $valueLabel.
- if ($mapping->getId() !== CRM_Contact_ActionMapping::CONTACT_MAPPING_ID) {
- $valueLabel = array('- ' . strtolower($mapping->getValueHeader()) . ' -');
- $entityValueLabels[$mapping->getId()] = $valueLabel + $entityValueLabels[$mapping->getId()];
- }
+ $valueLabel = array('- ' . strtolower($mapping->getValueHeader()) . ' -');
+ $entityValueLabels[$mapping->getId()] = $valueLabel + $entityValueLabels[$mapping->getId()];
}
$entityStatusLabels = array();