/**
  * @param $entityTable
  */
 public static function preProcess($entityTable)
 {
     self::$_entityId = (int) CRM_Utils_Request::retrieve('id', 'Positive');
     self::$_entityTable = $entityTable;
     if (self::$_entityId && $entityTable) {
         $checkParentExistsForThisId = CRM_Core_BAO_RecurringEntity::getParentFor(self::$_entityId, $entityTable);
         if ($checkParentExistsForThisId) {
             self::$_hasParent = TRUE;
             self::$_parentEntityId = $checkParentExistsForThisId;
             self::$_scheduleReminderDetails = CRM_Core_BAO_RecurringEntity::getReminderDetailsByEntityId($checkParentExistsForThisId, $entityTable);
         } else {
             self::$_parentEntityId = self::$_entityId;
             self::$_scheduleReminderDetails = CRM_Core_BAO_RecurringEntity::getReminderDetailsByEntityId(self::$_entityId, $entityTable);
         }
         if (property_exists(self::$_scheduleReminderDetails, 'id')) {
             self::$_scheduleReminderID = self::$_scheduleReminderDetails->id;
         }
     }
     CRM_Core_OptionValue::getValues(array('name' => $entityTable . '_repeat_exclude_dates_' . self::$_parentEntityId), $optionValue);
     $excludeOptionValues = array();
     if (!empty($optionValue)) {
         foreach ($optionValue as $key => $val) {
             $excludeOptionValues[$val['value']] = substr(CRM_Utils_Date::mysqlToIso($val['value']), 0, 10);
         }
         self::$_excludeDateInfo = $excludeOptionValues;
     }
     // Assign variables
     $entityType = CRM_Core_DAO_AllCoreTables::getBriefName(CRM_Core_DAO_AllCoreTables::getClassForTable($entityTable));
     $tpl = CRM_Core_Smarty::singleton();
     $tpl->assign('recurringEntityType', ts($entityType));
     $tpl->assign('currentEntityId', self::$_entityId);
     $tpl->assign('entityTable', self::$_entityTable);
     $tpl->assign('scheduleReminderId', self::$_scheduleReminderID);
     $tpl->assign('hasParent', self::$_hasParent);
 }