X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FDAO%2FPhone.php;h=7c594b5d9cb1f659e0aa1c0b97b79565260ea5e6;hb=e7a6b91ae4e3004b2d097ed318524d2ea7cf3fb0;hp=2bbf752354e8df80f3e443a9f30cc61bc3c9e9e0;hpb=9d7edfa6c8571be14fd127840a06cd3c42ae842a;p=civicrm-core.git diff --git a/CRM/Core/DAO/Phone.php b/CRM/Core/DAO/Phone.php index 2bbf752354..7c594b5d9c 100644 --- a/CRM/Core/DAO/Phone.php +++ b/CRM/Core/DAO/Phone.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.7 | +--------------------------------------------------------------------+ -| Copyright CiviCRM LLC (c) 2004-2016 | +| Copyright CiviCRM LLC (c) 2004-2017 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -26,24 +26,26 @@ */ /** * @package CRM - * @copyright CiviCRM LLC (c) 2004-2016 + * @copyright CiviCRM LLC (c) 2004-2017 * * Generated from xml/schema/CRM/Core/Phone.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:97437ba9054b6175f63fe45e1756081f) + * (GenCodeChecksum:661faad4886dd1a40784d465b906f447) */ require_once 'CRM/Core/DAO.php'; require_once 'CRM/Utils/Type.php'; +/** + * CRM_Core_DAO_Phone constructor. + */ class CRM_Core_DAO_Phone extends CRM_Core_DAO { /** - * static instance to hold the table name + * Static instance to hold the table name. * * @var string */ static $_tableName = 'civicrm_phone'; /** - * static value to see if we should log any modifications to - * this table in the civicrm_log table + * Should CiviCRM log any modifications to this table in the civicrm_log table. * * @var boolean */ @@ -109,16 +111,14 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO { */ public $phone_type_id; /** - * class constructor - * - * @return civicrm_phone + * Class constructor. */ function __construct() { $this->__table = 'civicrm_phone'; parent::__construct(); } /** - * Returns foreign keys and entity references + * Returns foreign keys and entity references. * * @return array * [CRM_Core_Reference_Interface] @@ -145,12 +145,20 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO { 'title' => ts('Phone ID') , 'description' => 'Unique Phone ID', 'required' => true, + 'table_name' => 'civicrm_phone', + 'entity' => 'Phone', + 'bao' => 'CRM_Core_BAO_Phone', + 'localizable' => 0, ) , 'contact_id' => array( 'name' => 'contact_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Phone Contact') , 'description' => 'FK to Contact ID', + 'table_name' => 'civicrm_phone', + 'entity' => 'Phone', + 'bao' => 'CRM_Core_BAO_Phone', + 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', ) , 'location_type_id' => array( @@ -158,6 +166,10 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO { 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Phone Location Type') , 'description' => 'Which Location does this phone belong to.', + 'table_name' => 'civicrm_phone', + 'entity' => 'Phone', + 'bao' => 'CRM_Core_BAO_Phone', + 'localizable' => 0, 'html' => array( 'type' => 'Select', ) , @@ -172,18 +184,30 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO { 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Phone Primary?') , 'description' => 'Is this the primary phone for this contact and location.', + 'table_name' => 'civicrm_phone', + 'entity' => 'Phone', + 'bao' => 'CRM_Core_BAO_Phone', + 'localizable' => 0, ) , 'is_billing' => array( 'name' => 'is_billing', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Billing Phone') , 'description' => 'Is this the billing?', + 'table_name' => 'civicrm_phone', + 'entity' => 'Phone', + 'bao' => 'CRM_Core_BAO_Phone', + 'localizable' => 0, ) , 'mobile_provider_id' => array( 'name' => 'mobile_provider_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Mobile Provider') , 'description' => 'Which Mobile Provider does this phone belong to.', + 'table_name' => 'civicrm_phone', + 'entity' => 'Phone', + 'bao' => 'CRM_Core_BAO_Phone', + 'localizable' => 0, ) , 'phone' => array( 'name' => 'phone', @@ -197,6 +221,10 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO { 'headerPattern' => '/phone/i', 'dataPattern' => '/^[\d\(\)\-\.\s]+$/', 'export' => true, + 'table_name' => 'civicrm_phone', + 'entity' => 'Phone', + 'bao' => 'CRM_Core_BAO_Phone', + 'localizable' => 0, 'html' => array( 'type' => 'Text', ) , @@ -213,6 +241,10 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO { 'headerPattern' => '/extension/i', 'dataPattern' => '/^\d+$/', 'export' => true, + 'table_name' => 'civicrm_phone', + 'entity' => 'Phone', + 'bao' => 'CRM_Core_BAO_Phone', + 'localizable' => 0, 'html' => array( 'type' => 'Text', ) , @@ -224,12 +256,20 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO { 'description' => 'Phone number stripped of all whitespace, letters, and punctuation.', 'maxlength' => 32, 'size' => CRM_Utils_Type::MEDIUM, + 'table_name' => 'civicrm_phone', + 'entity' => 'Phone', + 'bao' => 'CRM_Core_BAO_Phone', + 'localizable' => 0, ) , 'phone_type_id' => array( 'name' => 'phone_type_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Phone Type') , 'description' => 'Which type of phone does this number belongs.', + 'table_name' => 'civicrm_phone', + 'entity' => 'Phone', + 'bao' => 'CRM_Core_BAO_Phone', + 'localizable' => 0, 'html' => array( 'type' => 'Select', ) , @@ -293,4 +333,52 @@ class CRM_Core_DAO_Phone extends CRM_Core_DAO { $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'phone', $prefix, array()); return $r; } + /** + * Returns the list of indices + */ + public static function indices($localize = TRUE) { + $indices = array( + 'index_location_type' => array( + 'name' => 'index_location_type', + 'field' => array( + 0 => 'location_type_id', + ) , + 'localizable' => false, + 'sig' => 'civicrm_phone::0::location_type_id', + ) , + 'index_is_primary' => array( + 'name' => 'index_is_primary', + 'field' => array( + 0 => 'is_primary', + ) , + 'localizable' => false, + 'sig' => 'civicrm_phone::0::is_primary', + ) , + 'index_is_billing' => array( + 'name' => 'index_is_billing', + 'field' => array( + 0 => 'is_billing', + ) , + 'localizable' => false, + 'sig' => 'civicrm_phone::0::is_billing', + ) , + 'UI_mobile_provider_id' => array( + 'name' => 'UI_mobile_provider_id', + 'field' => array( + 0 => 'mobile_provider_id', + ) , + 'localizable' => false, + 'sig' => 'civicrm_phone::0::mobile_provider_id', + ) , + 'index_phone_numeric' => array( + 'name' => 'index_phone_numeric', + 'field' => array( + 0 => 'phone_numeric', + ) , + 'localizable' => false, + 'sig' => 'civicrm_phone::0::phone_numeric', + ) , + ); + return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; + } }