*/
public static $_entityType;
+ /**
+ * Checks current entityID has parent
+ */
+ public static $_hasParent = FALSE;
+
static function preProcess($entityType) {
self::$_entityId = (int) CRM_Utils_Request::retrieve('id', 'Positive');
self::$_entityType = $entityType;
if (self::$_entityId && $entityType) {
$checkParentExistsForThisId = CRM_Core_BAO_RecurringEntity::getParentFor(self::$_entityId, 'civicrm_'.$entityType);
if ($checkParentExistsForThisId) {
+ self::$_hasParent = TRUE;
self::$_parentEntityId = $checkParentExistsForThisId;
self::$_scheduleReminderDetails = CRM_Core_BAO_RecurringEntity::getReminderDetailsByEntityId($checkParentExistsForThisId, $entityType);
}
$excludeOptionValues[$val['value']] = date('m/d/Y', strtotime($val['value']));
}
self::$_excludeDateInfo = $excludeOptionValues;
- }
+ }
}
/**
$form->assign('currentEntityId', self::$_entityId);
$form->assign('entityType', self::$_entityType);
$form->assign('scheduleReminderId', self::$_scheduleReminderID);
+ $form->assign('hasParent', self::$_hasParent);
$form->_freqUnits = array('hour' => 'hour') + CRM_Core_OptionGroup::values('recur_frequency_units');
foreach ($form->_freqUnits as $val => $label) {
//Is a repeating event
if ($this->_isRepeatingEvent) {
- $isRepeat = 'repeat';
- $this->assign('isRepeat', $isRepeat);
+ $isRepeatingEntity = TRUE;
+ $this->assign('isRepeatingEntity', $isRepeatingEntity);
}
// also set up tabs