b71a3ac604ecec97edf2d807ed9ef33e09f98fa3
3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2016
31 * Generated from xml/schema/CRM/Core/Mapping.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:e2cbe03713267fb3e323225059ee8257)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_Mapping
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_mapping';
45 * static instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static instance to hold the values that can
68 static $_import = null;
70 * static instance to hold the values that can
75 static $_export = null;
77 * static value to see if we should log any modifications to
78 * this table in the civicrm_log table
96 * Description of Mapping.
106 public $mapping_type_id;
110 * @return civicrm_mapping
112 function __construct() {
113 $this->__table
= 'civicrm_mapping';
114 parent
::__construct();
117 * Returns all the column names of this table
121 static function &fields() {
122 if (!(self
::$_fields)) {
123 self
::$_fields = array(
126 'type' => CRM_Utils_Type
::T_INT
,
127 'title' => ts('Mapping ID') ,
128 'description' => 'Mapping ID',
133 'type' => CRM_Utils_Type
::T_STRING
,
134 'title' => ts('Name') ,
135 'description' => 'Name of Mapping',
137 'size' => CRM_Utils_Type
::BIG
,
139 'description' => array(
140 'name' => 'description',
141 'type' => CRM_Utils_Type
::T_STRING
,
142 'title' => ts('Description') ,
143 'description' => 'Description of Mapping.',
145 'size' => CRM_Utils_Type
::HUGE
,
147 'mapping_type_id' => array(
148 'name' => 'mapping_type_id',
149 'type' => CRM_Utils_Type
::T_INT
,
150 'title' => ts('Mapping Type') ,
151 'description' => 'Mapping Type',
155 'pseudoconstant' => array(
156 'optionGroupName' => 'mapping_type',
157 'optionEditPath' => 'civicrm/admin/options/mapping_type',
162 return self
::$_fields;
165 * Returns an array containing, for each field, the arary key used for that
166 * field in self::$_fields.
170 static function &fieldKeys() {
171 if (!(self
::$_fieldKeys)) {
172 self
::$_fieldKeys = array(
175 'description' => 'description',
176 'mapping_type_id' => 'mapping_type_id',
179 return self
::$_fieldKeys;
182 * Returns the names of this table
186 static function getTableName() {
187 return self
::$_tableName;
190 * Returns if this table needs to be logged
198 * Returns the list of fields that can be imported
200 * @param bool $prefix
204 static function &import($prefix = false) {
205 if (!(self
::$_import)) {
206 self
::$_import = array();
207 $fields = self
::fields();
208 foreach($fields as $name => $field) {
209 if (CRM_Utils_Array
::value('import', $field)) {
211 self
::$_import['mapping'] = & $fields[$name];
213 self
::$_import[$name] = & $fields[$name];
218 return self
::$_import;
221 * Returns the list of fields that can be exported
223 * @param bool $prefix
227 static function &export($prefix = false) {
228 if (!(self
::$_export)) {
229 self
::$_export = array();
230 $fields = self
::fields();
231 foreach($fields as $name => $field) {
232 if (CRM_Utils_Array
::value('export', $field)) {
234 self
::$_export['mapping'] = & $fields[$name];
236 self
::$_export[$name] = & $fields[$name];
241 return self
::$_export;