コード例 #1
0
 /**
  * returns all the column names of this table
  *
  * @access public
  * @return array
  */
 function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'required' => true), 'campaign_id' => array('name' => 'campaign_id', 'type' => CRM_Utils_Type::T_INT, 'required' => true, 'FKClassName' => 'CRM_Campaign_DAO_Campaign'), 'group_type' => array('name' => 'group_type', 'type' => CRM_Utils_Type::T_ENUM, 'title' => ts('Group Type'), 'default' => 'UL', 'enumValues' => 'Include, Exclude'), 'entity_table' => array('name' => 'entity_table', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Entity Table'), 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, 'default' => 'UL'), 'entity_id' => array('name' => 'entity_id', 'type' => CRM_Utils_Type::T_INT, 'default' => 'UL'));
     }
     return self::$_fields;
 }
コード例 #2
0
ファイル: CampaignGroup.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, 'description' => 'Campaign Group id.', 'required' => true), 'campaign_id' => array('name' => 'campaign_id', 'type' => CRM_Utils_Type::T_INT, 'description' => 'Foreign key to the activity Campaign.', 'required' => true, 'FKClassName' => 'CRM_Campaign_DAO_Campaign', 'pseudoconstant' => array('table' => 'civicrm_campaign', 'keyColumn' => 'id', 'labelColumn' => 'title')), 'group_type' => array('name' => 'group_type', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Group Type'), 'description' => 'Type of Group.', 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT, 'default' => 'NULL', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('callback' => 'CRM_Core_SelectValues::getCampaignGroupTypes')), 'entity_table' => array('name' => 'entity_table', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Entity Table'), 'description' => 'Name of table where item being referenced is stored.', 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, 'default' => 'NULL'), 'entity_id' => array('name' => 'entity_id', 'type' => CRM_Utils_Type::T_INT, 'description' => 'Entity id of referenced table.', 'default' => 'NULL'));
     }
     return self::$_fields;
 }