Ejemplo n.º 1
0
 /**
  * returns the list of fields that can be exported
  *
  * @access public
  * return array
  * @static
  */
 static function &export($prefix = false)
 {
     if (!self::$_export) {
         self::$_export = array();
         $fields = self::fields();
         foreach ($fields as $name => $field) {
             if (CRM_Utils_Array::value('export', $field)) {
                 if ($prefix) {
                     self::$_export['booking_slot'] =& $fields[$name];
                 } else {
                     self::$_export[$name] =& $fields[$name];
                 }
             }
         }
     }
     return self::$_export;
 }
Ejemplo n.º 2
0
 /**
  * Function to delete Slot
  *
  * @param  int  $id     Id of the Slot to be deleted.
  *
  * @return boolean
  *
  * @access public
  * @static
  */
 static function cancel($id)
 {
     $dao = new CRM_Booking_DAO_Slot();
     $dao->id = $id;
     $dao->is_cancelled = 1;
     return $dao->save();
 }