Esempio n. 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('Email ID'), 'description' => 'Unique Email ID', 'required' => true), 'contact_id' => array('name' => 'contact_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Email Contact'), 'description' => 'FK to Contact ID', 'FKClassName' => 'CRM_Contact_DAO_Contact'), 'location_type_id' => array('name' => 'location_type_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Email Location Type'), 'description' => 'Which Location does this email belong to.', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('table' => 'civicrm_location_type', 'keyColumn' => 'id', 'labelColumn' => 'display_name')), 'email' => array('name' => 'email', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Email'), 'description' => 'Email address', 'maxlength' => 254, 'size' => 30, 'import' => true, 'where' => 'civicrm_email.email', 'headerPattern' => '/e.?mail/i', 'dataPattern' => '/^[a-zA-Z][\\w\\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]\\.[a-zA-Z][a-zA-Z\\.]*[a-zA-Z]$/', 'export' => true, 'rule' => 'email', 'html' => array('type' => 'Text')), 'is_primary' => array('name' => 'is_primary', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Primary email'), 'description' => 'Is this the primary?'), 'is_billing' => array('name' => 'is_billing', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Billing Email?'), 'description' => 'Is this the billing?'), 'on_hold' => array('name' => 'on_hold', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('On Hold'), 'description' => 'Is this address on bounce hold?', 'required' => true, 'export' => true, 'where' => 'civicrm_email.on_hold', 'headerPattern' => '', 'dataPattern' => '', 'html' => array('type' => 'CheckBox')), 'is_bulkmail' => array('name' => 'is_bulkmail', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Use for Bulk Mail'), 'description' => 'Is this address for bulk mail ?', 'required' => true, 'export' => true, 'where' => 'civicrm_email.is_bulkmail', 'headerPattern' => '', 'dataPattern' => ''), 'hold_date' => array('name' => 'hold_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Hold Date'), 'description' => 'When the address went on bounce hold'), 'reset_date' => array('name' => 'reset_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Reset Date'), 'description' => 'When the address bounce status was last reset'), 'signature_text' => array('name' => 'signature_text', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Signature Text'), 'description' => 'Text formatted signature for the email.', 'import' => true, 'where' => 'civicrm_email.signature_text', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'default' => 'NULL'), 'signature_html' => array('name' => 'signature_html', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Signature Html'), 'description' => 'HTML formatted signature for the email.', 'import' => true, 'where' => 'civicrm_email.signature_html', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'default' => 'NULL'));
     }
     return self::$_fields;
 }
Esempio n. 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, 'FKClassName' => 'CRM_Contact_DAO_Contact'), 'location_type_id' => array('name' => 'location_type_id', 'type' => CRM_Utils_Type::T_INT), 'email' => array('name' => 'email', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Email'), 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, 'import' => true, 'where' => 'civicrm_email.email', 'headerPattern' => '/e.?mail/i', 'dataPattern' => '/^[a-zA-Z][\\w\\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]\\.[a-zA-Z][a-zA-Z\\.]*[a-zA-Z]$/', 'export' => true, 'rule' => 'email'), 'is_primary' => array('name' => 'is_primary', 'type' => CRM_Utils_Type::T_BOOLEAN), 'is_billing' => array('name' => 'is_billing', 'type' => CRM_Utils_Type::T_BOOLEAN), 'on_hold' => array('name' => 'on_hold', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('On Hold'), 'required' => true, 'export' => true, 'where' => 'civicrm_email.on_hold', 'headerPattern' => '', 'dataPattern' => ''), 'is_bulkmail' => array('name' => 'is_bulkmail', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Use for Bulk Mail'), 'required' => true, 'export' => true, 'where' => 'civicrm_email.is_bulkmail', 'headerPattern' => '', 'dataPattern' => ''), 'hold_date' => array('name' => 'hold_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Hold Date')), 'reset_date' => array('name' => 'reset_date', 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, 'title' => ts('Reset Date')), 'signature_text' => array('name' => 'signature_text', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Signature Text'), 'import' => true, 'where' => 'civicrm_email.signature_text', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'default' => 'UL'), 'signature_html' => array('name' => 'signature_html', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Signature Html'), 'import' => true, 'where' => 'civicrm_email.signature_html', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'default' => 'UL'));
     }
     return self::$_fields;
 }