*/
class CRM_Grant_BAO_Grant extends CRM_Grant_DAO_Grant {
- /**
- * Static field for all the grant information that we can potentially export.
- * @var array
- */
- static $_exportableFields = NULL;
-
/**
* Class constructor.
*/
* array of exportable Fields
*/
public static function &exportableFields() {
- if (!self::$_exportableFields) {
- if (!self::$_exportableFields) {
- self::$_exportableFields = array();
- }
-
- $grantFields = array(
- 'grant_status' => array(
- 'title' => ts('Grant Status'),
- 'name' => 'grant_status',
- 'data_type' => CRM_Utils_Type::T_STRING,
- ),
- 'grant_type' => array(
- 'title' => ts('Grant Type'),
- 'name' => 'grant_type',
- 'data_type' => CRM_Utils_Type::T_STRING,
- ),
- 'grant_money_transfer_date' => array(
- 'title' => ts('Grant Money Transfer Date'),
- 'name' => 'grant_money_transfer_date',
- 'data_type' => CRM_Utils_Type::T_DATE,
- ),
- 'grant_amount_requested' => array(
- 'title' => ts('Grant Amount Requested'),
- 'name' => 'grant_amount_requested',
- 'data_type' => CRM_Utils_Type::T_FLOAT,
- ),
- 'grant_application_received_date' => array(
- 'title' => ts('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;
- }
+ $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, $grantNote,
+ CRM_Core_BAO_CustomField::getFieldsForImport('Grant')
+ );
- return self::$_exportableFields;
+ return $fields;
}
/**
*
* Generated from xml/schema/CRM/Grant/Grant.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:600fc71093543f1c7b31ad663f2325c6)
+ * (GenCodeChecksum:13652dd0ca88b2b29b17df240790eece)
*/
/**
'type' => CRM_Utils_Type::T_DATE,
'title' => ts('Application received date'),
'description' => 'Date on which grant application was received by donor.',
- 'export' => TRUE,
+ 'import' => TRUE,
'where' => 'civicrm_grant.application_received_date',
'headerPattern' => '',
'dataPattern' => '',
+ 'export' => TRUE,
'table_name' => 'civicrm_grant',
'entity' => 'Grant',
'bao' => 'CRM_Grant_BAO_Grant',
'localizable' => 0,
+ 'html' => [
+ 'type' => 'Select Date',
+ 'formatType' => 'activityDate',
+ ],
],
'decision_date' => [
'name' => 'decision_date',
'localizable' => 0,
'html' => [
'type' => 'Select Date',
+ 'formatType' => 'activityDate',
],
],
'grant_money_transfer_date' => [
'localizable' => 0,
'html' => [
'type' => 'Select Date',
+ 'formatType' => 'activityDate',
],
],
'grant_due_date' => [
'type' => CRM_Utils_Type::T_DATE,
'title' => ts('Grant Due Date'),
'description' => 'Date on which grant report is due.',
+ 'import' => TRUE,
+ 'where' => 'civicrm_grant.grant_due_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => TRUE,
'table_name' => 'civicrm_grant',
'entity' => 'Grant',
'bao' => 'CRM_Grant_BAO_Grant',
'localizable' => 0,
'html' => [
'type' => 'Select Date',
+ 'formatType' => 'activityDate',
],
],
'grant_report_received' => [
<title>Application received date</title>
<type>date</type>
<export>true</export>
+ <import>true</import>
<comment>Date on which grant application was received by donor.</comment>
<add>1.8</add>
+ <html>
+ <type>Select Date</type>
+ <formatType>activityDate</formatType>
+ </html>
</field>
<field>
<name>decision_date</name>
<add>1.8</add>
<html>
<type>Select Date</type>
+ <formatType>activityDate</formatType>
</html>
</field>
<field>
<add>1.8</add>
<html>
<type>Select Date</type>
+ <formatType>activityDate</formatType>
</html>
</field>
<field>
<title>Grant Due Date</title>
<comment>Date on which grant report is due.</comment>
<add>1.8</add>
+ <import>true</import>
<html>
<type>Select Date</type>
+ <formatType>activityDate</formatType>
</html>
</field>
<field>