Example #1
0
 /**
  * Delete price set for the given entity and id.
  *
  * @param string $entityTable
  * @param int $entityId
  *
  * @return mixed
  */
 public static function removeFrom($entityTable, $entityId)
 {
     $dao = new CRM_Upgrade_Snapshot_V4p2_Price_DAO_SetEntity();
     $dao->entity_table = $entityTable;
     $dao->entity_id = $entityId;
     return $dao->delete();
 }
Example #2
0
 /**
  * returns the list of fields that can be exported.
  *
  * @param bool $prefix
  *
  * @return array
  */
 static function &export($prefix = FALSE)
 {
     if (!self::$_export) {
         self::$_export = array();
         $fields = self::fields();
         foreach ($fields as $name => $field) {
             if (!empty($field['export'])) {
                 if ($prefix) {
                     self::$_export['price_set_entity'] =& $fields[$name];
                 } else {
                     self::$_export[$name] =& $fields[$name];
                 }
             }
         }
     }
     return self::$_export;
 }
Example #3
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['price_set_entity'] =& $fields[$name];
                 } else {
                     self::$_export[$name] =& $fields[$name];
                 }
             }
         }
     }
     return self::$_export;
 }