示例#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, 'description' => 'Internal Id', 'required' => true), 'contact_id' => array('name' => 'contact_id', 'type' => CRM_Utils_Type::T_INT, 'description' => 'Contact Id', 'required' => true, 'FKClassName' => 'CRM_Contact_DAO_Contact'), 'group_id' => array('name' => 'group_id', 'type' => CRM_Utils_Type::T_INT, 'description' => 'Group Id', 'FKClassName' => 'CRM_Contact_DAO_Group', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('table' => 'civicrm_group', 'keyColumn' => 'id', 'labelColumn' => 'title')), 'date' => array('name' => 'date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Date'), 'description' => 'Date of the (un)subscription', 'required' => true), 'method' => array('name' => 'method', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Method'), 'description' => 'How the (un)subscription was triggered', 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT, 'html' => array('type' => 'Select'), 'pseudoconstant' => array('callback' => 'CRM_Core_SelectValues::getSubscriptionHistoryMethods')), 'status' => array('name' => 'status', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Status'), 'description' => 'The state of the contact within the group', 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT, 'pseudoconstant' => array('callback' => 'CRM_Core_SelectValues::groupContactStatus')), 'tracking' => array('name' => 'tracking', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Tracking'), 'description' => 'IP address or other tracking info', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE));
     }
     return self::$_fields;
 }
示例#2
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), 'contact_id' => array('name' => 'contact_id', 'type' => CRM_Utils_Type::T_INT, 'required' => true, 'FKClassName' => 'CRM_Contact_DAO_Contact'), 'group_id' => array('name' => 'group_id', 'type' => CRM_Utils_Type::T_INT, 'FKClassName' => 'CRM_Contact_DAO_Group'), 'date' => array('name' => 'date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Date'), 'required' => true), 'method' => array('name' => 'method', 'type' => CRM_Utils_Type::T_ENUM, 'title' => ts('Method'), 'enumValues' => 'Admin, Email, Web, API'), 'status' => array('name' => 'status', 'type' => CRM_Utils_Type::T_ENUM, 'title' => ts('Status'), 'enumValues' => 'Added, Removed, Pending'), 'tracking' => array('name' => 'tracking', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Tracking'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE));
     }
     return self::$_fields;
 }