/** * @param array $params (reference ) an assoc array of name/value pairs * * @return object CRM_Core_BAO_SEPASddFile object on success, null otherwise * @access public * @static */ static function add(&$params) { $hook = empty($params['id']) ? 'create' : 'edit'; CRM_Utils_Hook::pre($hook, 'SepaSddFile', CRM_Utils_Array::value('id', $params), $params); $dao = new CRM_Sepa_DAO_SEPASddFile(); $dao->copyValues($params); $dao->save(); CRM_Utils_Hook::post($hook, 'SepaSddFile', $dao->id, $dao); return $dao; }
/** * 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['sdd_file'] =& $fields[$name]; } else { self::$_export[$name] =& $fields[$name]; } } } } return self::$_export; }