/**
* Get all fields of the type Date
*/
-
public static function getDateFields() {
$allFields = CRM_Core_BAO_CustomField::getFields('');
$dateFields = array('birth_date' => ts('Birth Date'));
*
* @return array
* associated array of all the drop downs in the form
- * @static
*/
public static function getSelection($id = NULL) {
$mapping = self::getMapping();
*
* @return array
* (reference) reminder list
- * @static
*/
public static function &getList($namesOnly = FALSE, $entityValue = NULL, $id = NULL) {
$activity_type = CRM_Core_PseudoConstant::activityType(TRUE, TRUE);
foreach (array(
'text',
'html',
- 'sms_text'
+ 'sms_text',
) as $elem) {
$$elem = $smarty->fetch("string:{$$elem}");
}
$smsParams = array(
'To' => $phoneNumber,
'provider_id' => $schedule->sms_provider_id,
- 'activity_subject' => $messageSubject
+ 'activity_subject' => $messageSubject,
);
$activityTypeID = CRM_Core_OptionGroup::getValue('activity_type',
'SMS',
* The array that holds all the db ids.
*
* @return CRM_Core_DAO_ActionSchedule
- * @static
*/
public static function add(&$params, $ids = array()) {
$actionSchedule = new CRM_Core_DAO_ActionSchedule();
*
* @return CRM_Core_DAO_ActionSchedule|null
* object on success, null otherwise
- * @static
*/
public static function retrieve(&$params, &$values) {
if (empty($params)) {
* @param int $id
* ID of the Reminder to be deleted.
*
- * @static
*/
public static function del($id) {
if ($id) {
*
* @return Object
* DAO object on success, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_ActionSchedule', $id, 'is_active', $is_active);
$activityStatusID = FALSE;
if ($actionSchedule->record_activity) {
if ($mapping->entity == 'civicrm_membership') {
- $activityTypeID =
- CRM_Core_OptionGroup::getValue('activity_type', 'Membership Renewal Reminder', 'name');
+ $activityTypeID
+ = CRM_Core_OptionGroup::getValue('activity_type', 'Membership Renewal Reminder', 'name');
}
else {
- $activityTypeID =
- CRM_Core_OptionGroup::getValue('activity_type', 'Reminder Sent', 'name');
+ $activityTypeID
+ = CRM_Core_OptionGroup::getValue('activity_type', 'Reminder Sent', 'name');
}
- $activityStatusID =
- CRM_Core_OptionGroup::getValue('activity_status', 'Completed', 'name');
+ $activityStatusID
+ = CRM_Core_OptionGroup::getValue('activity_status', 'Completed', 'name');
}
if ($mapping->entity == 'civicrm_activity') {
'fee_amount',
'contact_email',
'contact_phone',
- 'balance'
+ 'balance',
);
$extraSelect = ', ov.label as event_type, ev.title, ev.id as event_id, ev.start_date, ev.end_date, ev.summary, ev.description, address.street_address, address.city, address.state_province_id, address.postal_code, email.email as contact_email, phone.phone as contact_phone ';
if ($toEmail || !(empty($toPhoneNumber) or $toDoNotSms)) {
$to['email'] = $toEmail;
$to['phone'] = $toPhoneNumber;
- $result =
- CRM_Core_BAO_ActionSchedule::sendReminder(
+ $result
+ = CRM_Core_BAO_ActionSchedule::sendReminder(
$dao->contactID,
$to,
$actionSchedule->id,
$activityParams = array(
'subject' => $actionSchedule->title,
'details' => $actionSchedule->body_html,
- 'source_contact_id' =>
- $session->get('userID') ? $session->get('userID') : $dao->contactID,
+ 'source_contact_id' => $session->get('userID') ? $session->get('userID') : $dao->contactID,
'target_contact_id' => $dao->contactID,
'activity_date_time' => date('YmdHis'),
'status_id' => $activityStatusID,
$valsqlInsertValues = CRM_Core_DAO::executeQuery($sqlInsertValues, array(
1 => array(
$actionSchedule->id,
- 'Integer'
- )
- ));
+ 'Integer',
+ ),
+ )
+ );
$arrValues = array();
while ($valsqlInsertValues->fetch()) {