+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* @param \Civi\ActionSchedule\Event\MappingRegisterEvent $registrations
*/
public static function onRegisterActionMappings(\Civi\ActionSchedule\Event\MappingRegisterEvent $registrations) {
* @param \Civi\ActionSchedule\Event\MappingRegisterEvent $registrations
*/
public static function onRegisterActionMappings(\Civi\ActionSchedule\Event\MappingRegisterEvent $registrations) {
'id' => CRM_Contact_ActionMapping::CONTACT_MAPPING_ID,
'entity' => 'civicrm_contact',
'entity_label' => ts('Contact'),
'id' => CRM_Contact_ActionMapping::CONTACT_MAPPING_ID,
'entity' => 'civicrm_contact',
'entity_label' => ts('Contact'),
'entity_status' => 'contact_date_reminder_options',
'entity_status_label' => ts('Annual Options'),
'entity_date_start' => 'date_field',
'entity_status' => 'contact_date_reminder_options',
'entity_status_label' => ts('Annual Options'),
'entity_date_start' => 'date_field',
if (CRM_Utils_System::isNull($schedule->entity_value) || $schedule->entity_value === '0') {
$errors['entity'] = ts('Please select a specific date field.');
}
if (CRM_Utils_System::isNull($schedule->entity_value) || $schedule->entity_value === '0') {
$errors['entity'] = ts('Please select a specific date field.');
}
elseif (in_array($selectedValues[0], $this->contactDateFields)) {
$dateDBField = $selectedValues[0];
$query = \CRM_Utils_SQL_Select::from("{$this->entity} e")->param($defaultParams);
elseif (in_array($selectedValues[0], $this->contactDateFields)) {
$dateDBField = $selectedValues[0];
$query = \CRM_Utils_SQL_Select::from("{$this->entity} e")->param($defaultParams);
'casAddlCheckFrom' => 'civicrm_contact e',
'casContactIdField' => 'e.id',
'casEntityIdField' => 'e.id',
'casContactTableAlias' => 'e',
'casAddlCheckFrom' => 'civicrm_contact e',
'casContactIdField' => 'e.id',
'casEntityIdField' => 'e.id',
'casContactTableAlias' => 'e',
- $customFieldParams = array('id' => substr($selectedValues[0], 7));
- $customGroup = $customField = array();
+ $customFieldParams = ['id' => substr($selectedValues[0], 7)];
+ $customGroup = $customField = [];
\CRM_Core_BAO_CustomField::retrieve($customFieldParams, $customField);
$dateDBField = $customField['column_name'];
\CRM_Core_BAO_CustomField::retrieve($customFieldParams, $customField);
$dateDBField = $customField['column_name'];
\CRM_Core_BAO_CustomGroup::retrieve($customGroupParams, $customGroup);
$query = \CRM_Utils_SQL_Select::from("{$customGroup['table_name']} e")->param($defaultParams);
\CRM_Core_BAO_CustomGroup::retrieve($customGroupParams, $customGroup);
$query = \CRM_Utils_SQL_Select::from("{$customGroup['table_name']} e")->param($defaultParams);
'casAddlCheckFrom' => "{$customGroup['table_name']} e",
'casContactIdField' => 'e.entity_id',
'casEntityIdField' => 'e.id',
'casContactTableAlias' => NULL,
'casAddlCheckFrom' => "{$customGroup['table_name']} e",
'casContactIdField' => 'e.entity_id',
'casEntityIdField' => 'e.id',
'casContactTableAlias' => NULL,