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/PrintLabel.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:f918d361f86f65ae2e6691b2d2dc062f)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_PrintLabel
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_print_label';
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 value to see if we should log any modifications to
64 * this table in the civicrm_log table
75 * User title for for this label layout
81 * variable name/programmatic handle for this field.
87 * Description of this label layout
93 * This refers to name column of civicrm_option_value row in name_badge option group
97 public $label_format_name;
99 * Implicit FK to civicrm_option_value row in NEW label_type option group
103 public $label_type_id;
105 * contains json encode configurations options
117 * Is this option active?
123 * Is this reserved label?
129 * FK to civicrm_contact, who created this label layout
137 * @return civicrm_print_label
139 function __construct() {
140 $this->__table
= 'civicrm_print_label';
141 parent
::__construct();
144 * Returns foreign keys and entity references
147 * [CRM_Core_Reference_Interface]
149 static function getReferenceColumns() {
150 if (!self
::$_links) {
151 self
::$_links = static ::createReferenceColumns(__CLASS__
);
152 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
154 return self
::$_links;
157 * Returns all the column names of this table
161 static function &fields() {
162 if (!(self
::$_fields)) {
163 self
::$_fields = array(
166 'type' => CRM_Utils_Type
::T_INT
,
167 'title' => ts('Print Label ID') ,
172 'type' => CRM_Utils_Type
::T_STRING
,
173 'title' => ts('Title') ,
174 'description' => 'User title for for this label layout',
176 'size' => CRM_Utils_Type
::HUGE
,
180 'type' => CRM_Utils_Type
::T_STRING
,
181 'title' => ts('Name') ,
182 'description' => 'variable name/programmatic handle for this field.',
184 'size' => CRM_Utils_Type
::HUGE
,
186 'description' => array(
187 'name' => 'description',
188 'type' => CRM_Utils_Type
::T_TEXT
,
189 'title' => ts('Description') ,
190 'description' => 'Description of this label layout',
192 'label_format_name' => array(
193 'name' => 'label_format_name',
194 'type' => CRM_Utils_Type
::T_STRING
,
195 'title' => ts('Label Format') ,
196 'description' => 'This refers to name column of civicrm_option_value row in name_badge option group',
198 'size' => CRM_Utils_Type
::HUGE
,
202 'pseudoconstant' => array(
203 'optionGroupName' => 'name_badge',
204 'optionEditPath' => 'civicrm/admin/options/name_badge',
207 'label_type_id' => array(
208 'name' => 'label_type_id',
209 'type' => CRM_Utils_Type
::T_INT
,
210 'title' => ts('Label Type') ,
211 'description' => 'Implicit FK to civicrm_option_value row in NEW label_type option group',
215 'pseudoconstant' => array(
216 'optionGroupName' => 'label_type',
217 'optionEditPath' => 'civicrm/admin/options/label_type',
222 'type' => CRM_Utils_Type
::T_LONGTEXT
,
223 'title' => ts('Data') ,
224 'description' => 'contains json encode configurations options',
226 'is_default' => array(
227 'name' => 'is_default',
228 'type' => CRM_Utils_Type
::T_BOOLEAN
,
229 'title' => ts('Label is Default?') ,
230 'description' => 'Is this default?',
233 'is_active' => array(
234 'name' => 'is_active',
235 'type' => CRM_Utils_Type
::T_BOOLEAN
,
236 'title' => ts('Label Is Active?') ,
237 'description' => 'Is this option active?',
240 'is_reserved' => array(
241 'name' => 'is_reserved',
242 'type' => CRM_Utils_Type
::T_BOOLEAN
,
243 'title' => ts('Is Label Reserved?') ,
244 'description' => 'Is this reserved label?',
247 'created_id' => array(
248 'name' => 'created_id',
249 'type' => CRM_Utils_Type
::T_INT
,
250 'title' => ts('Label Created By') ,
251 'description' => 'FK to civicrm_contact, who created this label layout',
252 'FKClassName' => 'CRM_Contact_DAO_Contact',
256 return self
::$_fields;
259 * Returns an array containing, for each field, the arary key used for that
260 * field in self::$_fields.
264 static function &fieldKeys() {
265 if (!(self
::$_fieldKeys)) {
266 self
::$_fieldKeys = array(
270 'description' => 'description',
271 'label_format_name' => 'label_format_name',
272 'label_type_id' => 'label_type_id',
274 'is_default' => 'is_default',
275 'is_active' => 'is_active',
276 'is_reserved' => 'is_reserved',
277 'created_id' => 'created_id',
280 return self
::$_fieldKeys;
283 * Returns the names of this table
287 static function getTableName() {
288 return self
::$_tableName;
291 * Returns if this table needs to be logged
299 * Returns the list of fields that can be imported
301 * @param bool $prefix
305 static function &import($prefix = false) {
306 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'print_label', $prefix, array());
310 * Returns the list of fields that can be exported
312 * @param bool $prefix
316 static function &export($prefix = false) {
317 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'print_label', $prefix, array());