3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
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-2017
31 * Generated from xml/schema/CRM/Core/PrintLabel.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:af33d193b72fd8c8bf260c0625c7acf6)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_PrintLabel constructor.
40 class CRM_Core_DAO_PrintLabel
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_print_label';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
59 * User title for for this label layout
65 * variable name/programmatic handle for this field.
71 * Description of this label layout
77 * This refers to name column of civicrm_option_value row in name_badge option group
81 public $label_format_name;
83 * Implicit FK to civicrm_option_value row in NEW label_type option group
87 public $label_type_id;
89 * contains json encode configurations options
101 * Is this option active?
107 * Is this reserved label?
113 * FK to civicrm_contact, who created this label layout
121 function __construct() {
122 $this->__table
= 'civicrm_print_label';
123 parent
::__construct();
126 * Returns foreign keys and entity references.
129 * [CRM_Core_Reference_Interface]
131 static function getReferenceColumns() {
132 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
133 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
134 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
135 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
137 return Civi
::$statics[__CLASS__
]['links'];
140 * Returns all the column names of this table
144 static function &fields() {
145 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
146 Civi
::$statics[__CLASS__
]['fields'] = array(
149 'type' => CRM_Utils_Type
::T_INT
,
150 'title' => ts('Print Label ID') ,
152 'table_name' => 'civicrm_print_label',
153 'entity' => 'PrintLabel',
154 'bao' => 'CRM_Core_DAO_PrintLabel',
159 'type' => CRM_Utils_Type
::T_STRING
,
160 'title' => ts('Title') ,
161 'description' => 'User title for for this label layout',
163 'size' => CRM_Utils_Type
::HUGE
,
164 'table_name' => 'civicrm_print_label',
165 'entity' => 'PrintLabel',
166 'bao' => 'CRM_Core_DAO_PrintLabel',
171 'type' => CRM_Utils_Type
::T_STRING
,
172 'title' => ts('Name') ,
173 'description' => 'variable name/programmatic handle for this field.',
175 'size' => CRM_Utils_Type
::HUGE
,
176 'table_name' => 'civicrm_print_label',
177 'entity' => 'PrintLabel',
178 'bao' => 'CRM_Core_DAO_PrintLabel',
181 'description' => array(
182 'name' => 'description',
183 'type' => CRM_Utils_Type
::T_TEXT
,
184 'title' => ts('Description') ,
185 'description' => 'Description of this label layout',
186 'table_name' => 'civicrm_print_label',
187 'entity' => 'PrintLabel',
188 'bao' => 'CRM_Core_DAO_PrintLabel',
191 'label_format_name' => array(
192 'name' => 'label_format_name',
193 'type' => CRM_Utils_Type
::T_STRING
,
194 'title' => ts('Label Format') ,
195 'description' => 'This refers to name column of civicrm_option_value row in name_badge option group',
197 'size' => CRM_Utils_Type
::HUGE
,
198 'table_name' => 'civicrm_print_label',
199 'entity' => 'PrintLabel',
200 'bao' => 'CRM_Core_DAO_PrintLabel',
205 'pseudoconstant' => array(
206 'optionGroupName' => 'name_badge',
207 'optionEditPath' => 'civicrm/admin/options/name_badge',
210 'label_type_id' => array(
211 'name' => 'label_type_id',
212 'type' => CRM_Utils_Type
::T_INT
,
213 'title' => ts('Label Type') ,
214 'description' => 'Implicit FK to civicrm_option_value row in NEW label_type option group',
215 'table_name' => 'civicrm_print_label',
216 'entity' => 'PrintLabel',
217 'bao' => 'CRM_Core_DAO_PrintLabel',
222 'pseudoconstant' => array(
223 'optionGroupName' => 'label_type',
224 'optionEditPath' => 'civicrm/admin/options/label_type',
229 'type' => CRM_Utils_Type
::T_LONGTEXT
,
230 'title' => ts('Data') ,
231 'description' => 'contains json encode configurations options',
232 'table_name' => 'civicrm_print_label',
233 'entity' => 'PrintLabel',
234 'bao' => 'CRM_Core_DAO_PrintLabel',
237 'is_default' => array(
238 'name' => 'is_default',
239 'type' => CRM_Utils_Type
::T_BOOLEAN
,
240 'title' => ts('Label is Default?') ,
241 'description' => 'Is this default?',
243 'table_name' => 'civicrm_print_label',
244 'entity' => 'PrintLabel',
245 'bao' => 'CRM_Core_DAO_PrintLabel',
248 'is_active' => array(
249 'name' => 'is_active',
250 'type' => CRM_Utils_Type
::T_BOOLEAN
,
251 'title' => ts('Label Is Active?') ,
252 'description' => 'Is this option active?',
254 'table_name' => 'civicrm_print_label',
255 'entity' => 'PrintLabel',
256 'bao' => 'CRM_Core_DAO_PrintLabel',
259 'is_reserved' => array(
260 'name' => 'is_reserved',
261 'type' => CRM_Utils_Type
::T_BOOLEAN
,
262 'title' => ts('Is Label Reserved?') ,
263 'description' => 'Is this reserved label?',
265 'table_name' => 'civicrm_print_label',
266 'entity' => 'PrintLabel',
267 'bao' => 'CRM_Core_DAO_PrintLabel',
270 'created_id' => array(
271 'name' => 'created_id',
272 'type' => CRM_Utils_Type
::T_INT
,
273 'title' => ts('Label Created By') ,
274 'description' => 'FK to civicrm_contact, who created this label layout',
275 'table_name' => 'civicrm_print_label',
276 'entity' => 'PrintLabel',
277 'bao' => 'CRM_Core_DAO_PrintLabel',
279 'FKClassName' => 'CRM_Contact_DAO_Contact',
282 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
284 return Civi
::$statics[__CLASS__
]['fields'];
287 * Return a mapping from field-name to the corresponding key (as used in fields()).
290 * Array(string $name => string $uniqueName).
292 static function &fieldKeys() {
293 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
294 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
296 return Civi
::$statics[__CLASS__
]['fieldKeys'];
299 * Returns the names of this table
303 static function getTableName() {
304 return self
::$_tableName;
307 * Returns if this table needs to be logged
315 * Returns the list of fields that can be imported
317 * @param bool $prefix
321 static function &import($prefix = false) {
322 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'print_label', $prefix, array());
326 * Returns the list of fields that can be exported
328 * @param bool $prefix
332 static function &export($prefix = false) {
333 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'print_label', $prefix, array());
337 * Returns the list of indices
339 public static function indices($localize = TRUE) {
341 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;