コード例 #1
0
 /**
  * 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('id', array('domain' => 'org.civicoop.myemma')), 'required' => true), 'account_id' => array('name' => 'account_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('My Emma Account', array('domain' => 'org.civicoop.myemma')), 'description' => '', 'required' => true), 'civicrm_field' => array('name' => 'civicrm_field', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('CiviCRM Field', array('domain' => 'org.civicoop.myemma')), 'description' => '', 'required' => true, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'autocomplete_option_list' => array('name' => 'autocomplete_option_list', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Autocomplete option value', array('domain' => 'org.civicoop.myemma')), 'description' => '', 'required' => true, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'location_type_id' => array('name' => 'location_type_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Location Type'), 'description' => 'Which Location does this field belong to.', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('table' => 'civicrm_location_type', 'keyColumn' => 'id', 'labelColumn' => 'display_name')), 'my_emma_field' => array('name' => 'my_emma_field', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Field ID', array('domain' => 'org.civicoop.myemma')), 'description' => '', 'required' => true, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE));
     }
     return self::$_fields;
 }