コード例 #1
0
ファイル: Campaign.php プロジェクト: kidaa30/yes
 /**
  * Returns all the column names of this table
  *
  * @return array
  */
 static function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Campaign ID'), 'description' => 'Unique Campaign ID.', 'required' => true, 'import' => true, 'where' => 'civicrm_campaign.id', 'headerPattern' => '', 'dataPattern' => '', 'export' => true), 'name' => array('name' => 'name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Campaign Name'), 'description' => 'Name of the Campaign.', 'required' => true, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, 'import' => true, 'where' => 'civicrm_campaign.name', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'html' => array('type' => 'Text')), 'title' => array('name' => 'title', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Campaign Title'), 'description' => 'Title of the Campaign.', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, 'import' => true, 'where' => 'civicrm_campaign.title', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'html' => array('type' => 'Text')), 'description' => array('name' => 'description', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Campaign Description'), 'description' => 'Full description of Campaign.', 'rows' => 8, 'cols' => 60, 'html' => array('type' => 'TextArea')), 'start_date' => array('name' => 'start_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Campaign Start Date'), 'description' => 'Date and time that Campaign starts.', 'import' => true, 'where' => 'civicrm_campaign.start_date', 'headerPattern' => '/^start|(s(tart\\s)?date)$/i', 'dataPattern' => '', 'export' => true, 'html' => array('type' => 'Select Date')), 'end_date' => array('name' => 'end_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Campaign End Date'), 'description' => 'Date and time that Campaign ends.', 'import' => true, 'where' => 'civicrm_campaign.end_date', 'headerPattern' => '/^end|(e(nd\\s)?date)$/i', 'dataPattern' => '', 'export' => true, 'html' => array('type' => 'Select Date')), 'campaign_type_id' => array('name' => 'campaign_type_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Campaign Type'), 'description' => 'Campaign Type ID.Implicit FK to civicrm_option_value where option_group = campaign_type', 'import' => true, 'where' => 'civicrm_campaign.campaign_type_id', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'default' => 'NULL', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('optionGroupName' => 'campaign_type', 'optionEditPath' => 'civicrm/admin/options/campaign_type')), 'status_id' => array('name' => 'status_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Campaign Status'), 'description' => 'Campaign status ID.Implicit FK to civicrm_option_value where option_group = campaign_status', 'import' => true, 'where' => 'civicrm_campaign.status_id', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'default' => 'NULL', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('optionGroupName' => 'campaign_status', 'optionEditPath' => 'civicrm/admin/options/campaign_status')), 'external_identifier' => array('name' => 'external_identifier', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Campaign External ID'), 'description' => 'Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.', 'maxlength' => 32, 'size' => CRM_Utils_Type::MEDIUM, 'import' => true, 'where' => 'civicrm_campaign.external_identifier', 'headerPattern' => '/external\\s?id/i', 'dataPattern' => '/^\\d{11,}$/', 'export' => true, 'html' => array('type' => 'Text')), 'parent_id' => array('name' => 'parent_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Parent Campaign'), 'description' => 'Optional parent id for this Campaign.', 'import' => true, 'where' => 'civicrm_campaign.parent_id', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'default' => 'NULL', 'FKClassName' => 'CRM_Campaign_DAO_Campaign', 'html' => array('type' => 'Autocomplete-Select')), 'is_active' => array('name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Campaign Active?'), 'description' => 'Is this Campaign enabled or disabled/cancelled?', 'default' => '1', 'html' => array('type' => 'CheckBox')), 'created_id' => array('name' => 'created_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Campaign Created By'), 'description' => 'FK to civicrm_contact, who created this Campaign.', 'FKClassName' => 'CRM_Contact_DAO_Contact'), 'created_date' => array('name' => 'created_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Campaign Created Date'), 'description' => 'Date and time that Campaign was created.', 'html' => array('type' => 'Select Date')), 'last_modified_id' => array('name' => 'last_modified_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Campaign Modified By'), 'description' => 'FK to civicrm_contact, who recently edited this Campaign.', 'FKClassName' => 'CRM_Contact_DAO_Contact'), 'last_modified_date' => array('name' => 'last_modified_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Campaign Modified Date'), 'description' => 'Date and time that Campaign was edited last time.'), 'goal_general' => array('name' => 'goal_general', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Campaign Goals'), 'description' => 'General goals for Campaign.', 'html' => array('type' => 'RichTextEditor')), 'goal_revenue' => array('name' => 'goal_revenue', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Goal Revenue'), 'description' => 'The target revenue for this campaign.', 'precision' => array(20, 2), 'html' => array('type' => 'Text')));
     }
     return self::$_fields;
 }
コード例 #2
0
ファイル: Campaign.php プロジェクト: hguru/224Civi
 /**
  * returns all the column names of this table
  *
  * @access public
  * @return array
  */
 static function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Campaign ID'), 'required' => true, 'import' => true, 'where' => 'civicrm_campaign.id', 'headerPattern' => '', 'dataPattern' => '', 'export' => true), 'name' => array('name' => 'name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Campaign Name'), 'required' => true, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, 'import' => true, 'where' => 'civicrm_campaign.name', 'headerPattern' => '', 'dataPattern' => '', 'export' => true), 'title' => array('name' => 'title', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Campaign Title'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, 'import' => true, 'where' => 'civicrm_campaign.title', 'headerPattern' => '', 'dataPattern' => '', 'export' => true), 'description' => array('name' => 'description', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Campaign Description'), 'rows' => 8, 'cols' => 60), 'start_date' => array('name' => 'start_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Campaign Start Date'), 'import' => true, 'where' => 'civicrm_campaign.start_date', 'headerPattern' => '/^start|(s(tart\\s)?date)$/i', 'dataPattern' => '', 'export' => true), 'end_date' => array('name' => 'end_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Campaign End Date'), 'import' => true, 'where' => 'civicrm_campaign.end_date', 'headerPattern' => '/^end|(e(nd\\s)?date)$/i', 'dataPattern' => '', 'export' => true), 'campaign_type_id' => array('name' => 'campaign_type_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Campaign Type ID'), 'import' => true, 'where' => 'civicrm_campaign.campaign_type_id', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'default' => 'NULL', 'pseudoconstant' => array('optionGroupName' => 'campaign_type')), 'status_id' => array('name' => 'status_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Campaign Status ID'), 'import' => true, 'where' => 'civicrm_campaign.status_id', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'default' => 'NULL', 'pseudoconstant' => array('optionGroupName' => 'campaign_status')), 'external_identifier' => array('name' => 'external_identifier', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Campaign External Identifier'), 'maxlength' => 32, 'size' => CRM_Utils_Type::MEDIUM, 'import' => true, 'where' => 'civicrm_campaign.external_identifier', 'headerPattern' => '/external\\s?id/i', 'dataPattern' => '/^\\d{11,}$/', 'export' => true), 'parent_id' => array('name' => 'parent_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Parent Campaign'), 'import' => true, 'where' => 'civicrm_campaign.parent_id', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'default' => 'NULL', 'FKClassName' => 'CRM_Campaign_DAO_Campaign'), 'is_active' => array('name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Campaign Active?'), 'default' => '1'), 'created_id' => array('name' => 'created_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Campaign Created By'), 'FKClassName' => 'CRM_Contact_DAO_Contact'), 'created_date' => array('name' => 'created_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Campaign Created Date')), 'last_modified_id' => array('name' => 'last_modified_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Campaign Modified By'), 'FKClassName' => 'CRM_Contact_DAO_Contact'), 'last_modified_date' => array('name' => 'last_modified_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Campaign Modified Date')), 'goal_general' => array('name' => 'goal_general', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Campaign Goals')), 'goal_revenue' => array('name' => 'goal_revenue', 'type' => CRM_Utils_Type::T_MONEY, 'title' => ts('Goal Revenue')));
     }
     return self::$_fields;
 }