5 * @copyright CiviCRM LLC (c) 2004-2019
7 * Generated from xml/schema/CRM/Core/Mapping.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:3014bcc2b0a9647bad0431f586015208)
13 * Database access object for the Mapping entity.
15 class CRM_Core_DAO_Mapping
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_mapping';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = FALSE;
46 * Description of Mapping.
57 public $mapping_type_id;
62 public function __construct() {
63 $this->__table
= 'civicrm_mapping';
64 parent
::__construct();
68 * Returns all the column names of this table
72 public static function &fields() {
73 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
74 Civi
::$statics[__CLASS__
]['fields'] = [
77 'type' => CRM_Utils_Type
::T_INT
,
78 'title' => ts('Mapping ID'),
79 'description' => ts('Mapping ID'),
81 'where' => 'civicrm_mapping.id',
82 'table_name' => 'civicrm_mapping',
83 'entity' => 'Mapping',
84 'bao' => 'CRM_Core_BAO_Mapping',
89 'type' => CRM_Utils_Type
::T_STRING
,
90 'title' => ts('Name'),
91 'description' => ts('Name of Mapping'),
93 'size' => CRM_Utils_Type
::BIG
,
94 'where' => 'civicrm_mapping.name',
95 'table_name' => 'civicrm_mapping',
96 'entity' => 'Mapping',
97 'bao' => 'CRM_Core_BAO_Mapping',
101 'name' => 'description',
102 'type' => CRM_Utils_Type
::T_STRING
,
103 'title' => ts('Description'),
104 'description' => ts('Description of Mapping.'),
106 'size' => CRM_Utils_Type
::HUGE
,
107 'where' => 'civicrm_mapping.description',
108 'table_name' => 'civicrm_mapping',
109 'entity' => 'Mapping',
110 'bao' => 'CRM_Core_BAO_Mapping',
113 'mapping_type_id' => [
114 'name' => 'mapping_type_id',
115 'type' => CRM_Utils_Type
::T_INT
,
116 'title' => ts('Mapping Type'),
117 'description' => ts('Mapping Type'),
118 'where' => 'civicrm_mapping.mapping_type_id',
119 'table_name' => 'civicrm_mapping',
120 'entity' => 'Mapping',
121 'bao' => 'CRM_Core_BAO_Mapping',
126 'pseudoconstant' => [
127 'optionGroupName' => 'mapping_type',
128 'optionEditPath' => 'civicrm/admin/options/mapping_type',
132 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
134 return Civi
::$statics[__CLASS__
]['fields'];
138 * Return a mapping from field-name to the corresponding key (as used in fields()).
141 * Array(string $name => string $uniqueName).
143 public static function &fieldKeys() {
144 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
145 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
147 return Civi
::$statics[__CLASS__
]['fieldKeys'];
151 * Returns the names of this table
155 public static function getTableName() {
156 return self
::$_tableName;
160 * Returns if this table needs to be logged
164 public function getLog() {
169 * Returns the list of fields that can be imported
171 * @param bool $prefix
175 public static function &import($prefix = FALSE) {
176 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mapping', $prefix, []);
181 * Returns the list of fields that can be exported
183 * @param bool $prefix
187 public static function &export($prefix = FALSE) {
188 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mapping', $prefix, []);
193 * Returns the list of indices
195 * @param bool $localize
199 public static function indices($localize = TRUE) {
206 'localizable' => FALSE,
207 'sig' => 'civicrm_mapping::0::name',
210 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;