static function &getFields() { $fields = array(); require_once 'CRM/Grant/DAO/Grant.php'; $fields = array_merge($fields, CRM_Grant_DAO_Grant::export()); return $fields; }
/** * Combine all the exportable fields from the lower levels object. * * @return array * array of exportable Fields */ public static function &exportableFields() { if (!self::$_exportableFields) { if (!self::$_exportableFields) { self::$_exportableFields = array(); } $grantFields = array('grant_status' => array('title' => 'Grant Status', 'name' => 'grant_status', 'data_type' => CRM_Utils_Type::T_STRING), 'grant_type' => array('title' => 'Grant Type', 'name' => 'grant_type', 'data_type' => CRM_Utils_Type::T_STRING), 'grant_money_transfer_date' => array('title' => 'Grant Money Transfer Date', 'name' => 'grant_money_transfer_date', 'data_type' => CRM_Utils_Type::T_DATE), 'grant_amount_requested' => array('title' => 'Grant Amount Requested', 'name' => 'grant_amount_requested', 'data_type' => CRM_Utils_Type::T_FLOAT), 'grant_application_received_date' => array('title' => 'Grant Application Received Date', 'name' => 'grant_application_received_date', 'data_type' => CRM_Utils_Type::T_DATE)); $fields = CRM_Grant_DAO_Grant::export(); $grantNote = array('grant_note' => array('title' => ts('Grant Note'), 'name' => 'grant_note', 'data_type' => CRM_Utils_Type::T_TEXT)); $fields = array_merge($fields, $grantFields, $grantNote, CRM_Core_BAO_CustomField::getFieldsForImport('Grant')); self::$_exportableFields = $fields; } return self::$_exportableFields; }
/** * combine all the exportable fields from the lower levels object * * @return array array of exportable Fields * @access public */ function &exportableFields() { if (!self::$_exportableFields) { if (!self::$_exportableFields) { self::$_exportableFields = array(); } require_once 'CRM/Grant/DAO/Grant.php'; $fields = CRM_Grant_DAO_Grant::export(); $fields = array_merge($fields, CRM_Core_BAO_CustomField::getFieldsForImport('Grant')); self::$_exportableFields = $fields; } return self::$_exportableFields; }