本文整理汇总了PHP中CRM_Core_DAO_Address::_fields方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_DAO_Address::_fields方法的具体用法?PHP CRM_Core_DAO_Address::_fields怎么用?PHP CRM_Core_DAO_Address::_fields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_DAO_Address
的用法示例。
在下文中一共展示了CRM_Core_DAO_Address::_fields方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* 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('Address ID'), 'description' => 'Unique Address ID', 'required' => true), 'contact_id' => array('name' => 'contact_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Contact ID'), '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('Address Location Type'), 'description' => 'Which Location does this address belong to.', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('table' => 'civicrm_location_type', 'keyColumn' => 'id', 'labelColumn' => 'display_name')), 'is_primary' => array('name' => 'is_primary', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Address Primary?'), 'description' => 'Is this the primary address.', 'html' => array('type' => 'CheckBox')), 'is_billing' => array('name' => 'is_billing', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Billing Address'), 'description' => 'Is this the billing address.', 'html' => array('type' => 'CheckBox')), 'street_address' => array('name' => 'street_address', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Address'), 'description' => 'Concatenation of all routable street address components (prefix, street number, street name, suffix, unit
number OR P.O. Box). Apps should be able to determine physical location with this data (for mapping, mail
delivery, etc.).
', 'maxlength' => 96, 'size' => CRM_Utils_Type::HUGE, 'import' => true, 'where' => 'civicrm_address.street_address', 'headerPattern' => '/(street|address)/i', 'dataPattern' => '/^(\\d{1,5}( [0-9A-Za-z]+)+)$|^(P\\.?O\\.\\? Box \\d{1,5})$/i', 'export' => true, 'html' => array('type' => 'Text')), 'street_number' => array('name' => 'street_number', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Street Number'), 'description' => 'Numeric portion of address number on the street, e.g. For 112A Main St, the street_number = 112.', 'export' => true, 'where' => 'civicrm_address.street_number', 'headerPattern' => '', 'dataPattern' => '', 'html' => array('type' => 'Text')), 'street_number_suffix' => array('name' => 'street_number_suffix', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Number Suffix'), 'description' => 'Non-numeric portion of address number on the street, e.g. For 112A Main St, the street_number_suffix = A
', 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT, 'export' => true, 'where' => 'civicrm_address.street_number_suffix', 'headerPattern' => '', 'dataPattern' => '', 'html' => array('type' => 'Text')), 'street_number_predirectional' => array('name' => 'street_number_predirectional', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Direction Prefix'), 'description' => 'Directional prefix, e.g. SE Main St, SE is the prefix.', 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT, 'html' => array('type' => 'Text')), 'street_name' => array('name' => 'street_name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Name'), 'description' => 'Actual street name, excluding St, Dr, Rd, Ave, e.g. For 112 Main St, the street_name = Main.', 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, 'export' => true, 'where' => 'civicrm_address.street_name', 'headerPattern' => '', 'dataPattern' => '', 'html' => array('type' => 'Text')), 'street_type' => array('name' => 'street_type', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Type'), 'description' => 'St, Rd, Dr, etc.', 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT, 'html' => array('type' => 'Text')), 'street_number_postdirectional' => array('name' => 'street_number_postdirectional', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Direction Suffix'), 'description' => 'Directional prefix, e.g. Main St S, S is the suffix.', 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT, 'html' => array('type' => 'Text')), 'street_unit' => array('name' => 'street_unit', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Unit'), 'description' => 'Secondary unit designator, e.g. Apt 3 or Unit # 14, or Bldg 1200', 'maxlength' => 16, 'size' => CRM_Utils_Type::TWELVE, 'export' => true, 'where' => 'civicrm_address.street_unit', 'headerPattern' => '', 'dataPattern' => '', 'html' => array('type' => 'Text')), 'supplemental_address_1' => array('name' => 'supplemental_address_1', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Supplemental Address 1'), 'description' => 'Supplemental Address Information, Line 1', 'maxlength' => 96, 'size' => CRM_Utils_Type::HUGE, 'import' => true, 'where' => 'civicrm_address.supplemental_address_1', 'headerPattern' => '/(supplemental(\\s)?)?address(\\s\\d+)?/i', 'dataPattern' => '/unit|ap(ar)?t(ment)?\\s(\\d|\\w)+/i', 'export' => true, 'html' => array('type' => 'Text')), 'supplemental_address_2' => array('name' => 'supplemental_address_2', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Supplemental Address 2'), 'description' => 'Supplemental Address Information, Line 2', 'maxlength' => 96, 'size' => CRM_Utils_Type::HUGE, 'import' => true, 'where' => 'civicrm_address.supplemental_address_2', 'headerPattern' => '/(supplemental(\\s)?)?address(\\s\\d+)?/i', 'dataPattern' => '/unit|ap(ar)?t(ment)?\\s(\\d|\\w)+/i', 'export' => true, 'html' => array('type' => 'Text')), 'supplemental_address_3' => array('name' => 'supplemental_address_3', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Supplemental Address 3'), 'description' => 'Supplemental Address Information, Line 3', 'maxlength' => 96, 'size' => CRM_Utils_Type::HUGE, 'html' => array('type' => 'Text')), 'city' => array('name' => 'city', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('City'), 'description' => 'City, Town or Village Name.', 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, 'import' => true, 'where' => 'civicrm_address.city', 'headerPattern' => '/city/i', 'dataPattern' => '/^[A-Za-z]+(\\.?)(\\s?[A-Za-z]+){0,2}$/', 'export' => true, 'html' => array('type' => 'Text')), 'county_id' => array('name' => 'county_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('County'), 'description' => 'Which County does this address belong to.', 'FKClassName' => 'CRM_Core_DAO_County', 'html' => array('type' => 'ChainSelect'), 'pseudoconstant' => array('table' => 'civicrm_county', 'keyColumn' => 'id', 'labelColumn' => 'name')), 'state_province_id' => array('name' => 'state_province_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('State/Province'), 'description' => 'Which State_Province does this address belong to.', 'FKClassName' => 'CRM_Core_DAO_StateProvince', 'html' => array('type' => 'ChainSelect'), 'pseudoconstant' => array('table' => 'civicrm_state_province', 'keyColumn' => 'id', 'labelColumn' => 'name')), 'postal_code_suffix' => array('name' => 'postal_code_suffix', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Postal Code Suffix'), 'description' => 'Store the suffix, like the +4 part in the USPS system.', 'maxlength' => 12, 'size' => 3, 'import' => true, 'where' => 'civicrm_address.postal_code_suffix', 'headerPattern' => '/p(ostal)\\sc(ode)\\ss(uffix)/i', 'dataPattern' => '/\\d?\\d{4}(-\\d{4})?/', 'export' => true, 'html' => array('type' => 'Text')), 'postal_code' => array('name' => 'postal_code', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Postal Code'), 'description' => 'Store both US (zip5) AND international postal codes. App is responsible for country/region appropriate validation.', 'maxlength' => 12, 'size' => 6, 'import' => true, 'where' => 'civicrm_address.postal_code', 'headerPattern' => '/postal|zip/i', 'dataPattern' => '/\\d?\\d{4}(-\\d{4})?/', 'export' => true, 'html' => array('type' => 'Text')), 'usps_adc' => array('name' => 'usps_adc', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('USPS Code'), 'description' => 'USPS Bulk mailing code.', 'maxlength' => 32, 'size' => CRM_Utils_Type::MEDIUM), 'country_id' => array('name' => 'country_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Country'), 'description' => 'Which Country does this address belong to.', 'FKClassName' => 'CRM_Core_DAO_Country', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('table' => 'civicrm_country', 'keyColumn' => 'id', 'labelColumn' => 'name', 'nameColumn' => 'iso_code')), 'geo_code_1' => array('name' => 'geo_code_1', 'type' => CRM_Utils_Type::T_FLOAT, 'title' => ts('Latitude'), 'description' => 'Latitude', 'import' => true, 'where' => 'civicrm_address.geo_code_1', 'headerPattern' => '/geo/i', 'dataPattern' => '', 'export' => true, 'html' => array('type' => 'Text')), 'geo_code_2' => array('name' => 'geo_code_2', 'type' => CRM_Utils_Type::T_FLOAT, 'title' => ts('Longitude'), 'description' => 'Longitude', 'import' => true, 'where' => 'civicrm_address.geo_code_2', 'headerPattern' => '/geo/i', 'dataPattern' => '', 'export' => true, 'html' => array('type' => 'Text')), 'manual_geo_code' => array('name' => 'manual_geo_code', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is manually geocoded'), 'description' => 'Is this a manually entered geo code', 'html' => array('type' => 'CheckBox')), 'timezone' => array('name' => 'timezone', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Timezone'), 'description' => 'Timezone expressed as a UTC offset - e.g. United States CST would be written as "UTC-6".', 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT, 'html' => array('type' => 'Text')), 'address_name' => array('name' => 'name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Address Name'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, 'import' => true, 'where' => 'civicrm_address.name', 'headerPattern' => '/^location|(l(ocation\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => true, 'html' => array('type' => 'Text')), 'master_id' => array('name' => 'master_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Master Address Belongs To'), 'description' => 'FK to Address ID', 'import' => true, 'where' => 'civicrm_address.master_id', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'FKClassName' => 'CRM_Core_DAO_Address'));
}
return self::$_fields;
}
示例2: array
/**
* 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, '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, 'title' => ts('Address Location Type'), 'pseudoconstant' => array('table' => 'civicrm_location_type', 'keyColumn' => 'id', 'labelColumn' => 'display_name')), 'is_primary' => array('name' => 'is_primary', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Address Primary?')), 'is_billing' => array('name' => 'is_billing', 'type' => CRM_Utils_Type::T_BOOLEAN), 'street_address' => array('name' => 'street_address', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Address'), 'maxlength' => 96, 'size' => CRM_Utils_Type::HUGE, 'import' => true, 'where' => 'civicrm_address.street_address', 'headerPattern' => '/(street|address)/i', 'dataPattern' => '/^(\\d{1,5}( [0-9A-Za-z]+)+)$|^(P\\.?O\\.\\? Box \\d{1,5})$/i', 'export' => true), 'street_number' => array('name' => 'street_number', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Street Number'), 'export' => true, 'where' => 'civicrm_address.street_number', 'headerPattern' => '', 'dataPattern' => ''), 'street_number_suffix' => array('name' => 'street_number_suffix', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Number Suffix'), 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT, 'export' => true, 'where' => 'civicrm_address.street_number_suffix', 'headerPattern' => '', 'dataPattern' => ''), 'street_number_predirectional' => array('name' => 'street_number_predirectional', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Number Predirectional'), 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT), 'street_name' => array('name' => 'street_name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Name'), 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, 'export' => true, 'where' => 'civicrm_address.street_name', 'headerPattern' => '', 'dataPattern' => ''), 'street_type' => array('name' => 'street_type', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Type'), 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT), 'street_number_postdirectional' => array('name' => 'street_number_postdirectional', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Number Postdirectional'), 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT), 'street_unit' => array('name' => 'street_unit', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Street Unit'), 'maxlength' => 16, 'size' => CRM_Utils_Type::TWELVE, 'export' => true, 'where' => 'civicrm_address.street_unit', 'headerPattern' => '', 'dataPattern' => ''), 'supplemental_address_1' => array('name' => 'supplemental_address_1', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Supplemental Address 1'), 'maxlength' => 96, 'size' => CRM_Utils_Type::HUGE, 'import' => true, 'where' => 'civicrm_address.supplemental_address_1', 'headerPattern' => '/(supplemental(\\s)?)?address(\\s\\d+)?/i', 'dataPattern' => '/unit|ap(ar)?t(ment)?\\s(\\d|\\w)+/i', 'export' => true), 'supplemental_address_2' => array('name' => 'supplemental_address_2', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Supplemental Address 2'), 'maxlength' => 96, 'size' => CRM_Utils_Type::HUGE, 'import' => true, 'where' => 'civicrm_address.supplemental_address_2', 'headerPattern' => '/(supplemental(\\s)?)?address(\\s\\d+)?/i', 'dataPattern' => '/unit|ap(ar)?t(ment)?\\s(\\d|\\w)+/i', 'export' => true), 'supplemental_address_3' => array('name' => 'supplemental_address_3', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Supplemental Address 3'), 'maxlength' => 96, 'size' => CRM_Utils_Type::HUGE), 'city' => array('name' => 'city', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('City'), 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, 'import' => true, 'where' => 'civicrm_address.city', 'headerPattern' => '/city/i', 'dataPattern' => '/^[A-Za-z]+(\\.?)(\\s?[A-Za-z]+){0,2}$/', 'export' => true), 'county_id' => array('name' => 'county_id', 'type' => CRM_Utils_Type::T_INT, 'FKClassName' => 'CRM_Core_DAO_County', 'pseudoconstant' => array('table' => 'civicrm_county', 'keyColumn' => 'id', 'labelColumn' => 'name')), 'state_province_id' => array('name' => 'state_province_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('State'), 'FKClassName' => 'CRM_Core_DAO_StateProvince', 'pseudoconstant' => array('table' => 'civicrm_state_province', 'keyColumn' => 'id', 'labelColumn' => 'name')), 'postal_code_suffix' => array('name' => 'postal_code_suffix', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Postal Code Suffix'), 'maxlength' => 12, 'size' => CRM_Utils_Type::TWELVE, 'import' => true, 'where' => 'civicrm_address.postal_code_suffix', 'headerPattern' => '/p(ostal)\\sc(ode)\\ss(uffix)/i', 'dataPattern' => '/\\d?\\d{4}(-\\d{4})?/', 'export' => true), 'postal_code' => array('name' => 'postal_code', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Postal Code'), 'maxlength' => 12, 'size' => CRM_Utils_Type::TWELVE, 'import' => true, 'where' => 'civicrm_address.postal_code', 'headerPattern' => '/postal|zip/i', 'dataPattern' => '/\\d?\\d{4}(-\\d{4})?/', 'export' => true), 'usps_adc' => array('name' => 'usps_adc', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Usps Adc'), 'maxlength' => 32, 'size' => CRM_Utils_Type::MEDIUM), 'country_id' => array('name' => 'country_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Country'), 'FKClassName' => 'CRM_Core_DAO_Country', 'pseudoconstant' => array('table' => 'civicrm_country', 'keyColumn' => 'id', 'labelColumn' => 'name', 'nameColumn' => 'iso_code')), 'geo_code_1' => array('name' => 'geo_code_1', 'type' => CRM_Utils_Type::T_FLOAT, 'title' => ts('Geo Code 1'), 'import' => true, 'where' => 'civicrm_address.geo_code_1', 'headerPattern' => '/geo/i', 'dataPattern' => '', 'export' => true), 'geo_code_2' => array('name' => 'geo_code_2', 'type' => CRM_Utils_Type::T_FLOAT, 'title' => ts('Geo Code 2'), 'import' => true, 'where' => 'civicrm_address.geo_code_2', 'headerPattern' => '/geo/i', 'dataPattern' => '', 'export' => true), 'manual_geo_code' => array('name' => 'manual_geo_code', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Manual Geo Code')), 'timezone' => array('name' => 'timezone', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Timezone'), 'maxlength' => 8, 'size' => CRM_Utils_Type::EIGHT), 'address_name' => array('name' => 'name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Address Name'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, 'import' => true, 'where' => 'civicrm_address.name', 'headerPattern' => '/^location|(l(ocation\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => true), 'master_id' => array('name' => 'master_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Master Address Belongs To'), 'import' => true, 'where' => 'civicrm_address.master_id', 'headerPattern' => '', 'dataPattern' => '', 'export' => true, 'FKClassName' => 'CRM_Core_DAO_Address'));
}
return self::$_fields;
}