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:26d8aa33c9340571c606aa5b8f085c1a)
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 'table_name' => 'civicrm_mapping',
82 'entity' => 'Mapping',
83 'bao' => 'CRM_Core_BAO_Mapping',
88 'type' => CRM_Utils_Type
::T_STRING
,
89 'title' => ts('Name'),
90 'description' => ts('Name of Mapping'),
92 'size' => CRM_Utils_Type
::BIG
,
93 'table_name' => 'civicrm_mapping',
94 'entity' => 'Mapping',
95 'bao' => 'CRM_Core_BAO_Mapping',
99 'name' => 'description',
100 'type' => CRM_Utils_Type
::T_STRING
,
101 'title' => ts('Description'),
102 'description' => ts('Description of Mapping.'),
104 'size' => CRM_Utils_Type
::HUGE
,
105 'table_name' => 'civicrm_mapping',
106 'entity' => 'Mapping',
107 'bao' => 'CRM_Core_BAO_Mapping',
110 'mapping_type_id' => [
111 'name' => 'mapping_type_id',
112 'type' => CRM_Utils_Type
::T_INT
,
113 'title' => ts('Mapping Type'),
114 'description' => ts('Mapping Type'),
115 'table_name' => 'civicrm_mapping',
116 'entity' => 'Mapping',
117 'bao' => 'CRM_Core_BAO_Mapping',
122 'pseudoconstant' => [
123 'optionGroupName' => 'mapping_type',
124 'optionEditPath' => 'civicrm/admin/options/mapping_type',
128 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
130 return Civi
::$statics[__CLASS__
]['fields'];
134 * Return a mapping from field-name to the corresponding key (as used in fields()).
137 * Array(string $name => string $uniqueName).
139 public static function &fieldKeys() {
140 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
141 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
143 return Civi
::$statics[__CLASS__
]['fieldKeys'];
147 * Returns the names of this table
151 public static function getTableName() {
152 return self
::$_tableName;
156 * Returns if this table needs to be logged
160 public function getLog() {
165 * Returns the list of fields that can be imported
167 * @param bool $prefix
171 public static function &import($prefix = FALSE) {
172 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'mapping', $prefix, []);
177 * Returns the list of fields that can be exported
179 * @param bool $prefix
183 public static function &export($prefix = FALSE) {
184 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'mapping', $prefix, []);
189 * Returns the list of indices
191 * @param bool $localize
195 public static function indices($localize = TRUE) {
202 'localizable' => FALSE,
203 'sig' => 'civicrm_mapping::0::name',
206 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;