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:f918d361f86f65ae2e6691b2d2dc062f)
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') ,
155 'type' => CRM_Utils_Type
::T_STRING
,
156 'title' => ts('Title') ,
157 'description' => 'User title for for this label layout',
159 'size' => CRM_Utils_Type
::HUGE
,
163 'type' => CRM_Utils_Type
::T_STRING
,
164 'title' => ts('Name') ,
165 'description' => 'variable name/programmatic handle for this field.',
167 'size' => CRM_Utils_Type
::HUGE
,
169 'description' => array(
170 'name' => 'description',
171 'type' => CRM_Utils_Type
::T_TEXT
,
172 'title' => ts('Description') ,
173 'description' => 'Description of this label layout',
175 'label_format_name' => array(
176 'name' => 'label_format_name',
177 'type' => CRM_Utils_Type
::T_STRING
,
178 'title' => ts('Label Format') ,
179 'description' => 'This refers to name column of civicrm_option_value row in name_badge option group',
181 'size' => CRM_Utils_Type
::HUGE
,
185 'pseudoconstant' => array(
186 'optionGroupName' => 'name_badge',
187 'optionEditPath' => 'civicrm/admin/options/name_badge',
190 'label_type_id' => array(
191 'name' => 'label_type_id',
192 'type' => CRM_Utils_Type
::T_INT
,
193 'title' => ts('Label Type') ,
194 'description' => 'Implicit FK to civicrm_option_value row in NEW label_type option group',
198 'pseudoconstant' => array(
199 'optionGroupName' => 'label_type',
200 'optionEditPath' => 'civicrm/admin/options/label_type',
205 'type' => CRM_Utils_Type
::T_LONGTEXT
,
206 'title' => ts('Data') ,
207 'description' => 'contains json encode configurations options',
209 'is_default' => array(
210 'name' => 'is_default',
211 'type' => CRM_Utils_Type
::T_BOOLEAN
,
212 'title' => ts('Label is Default?') ,
213 'description' => 'Is this default?',
216 'is_active' => array(
217 'name' => 'is_active',
218 'type' => CRM_Utils_Type
::T_BOOLEAN
,
219 'title' => ts('Label Is Active?') ,
220 'description' => 'Is this option active?',
223 'is_reserved' => array(
224 'name' => 'is_reserved',
225 'type' => CRM_Utils_Type
::T_BOOLEAN
,
226 'title' => ts('Is Label Reserved?') ,
227 'description' => 'Is this reserved label?',
230 'created_id' => array(
231 'name' => 'created_id',
232 'type' => CRM_Utils_Type
::T_INT
,
233 'title' => ts('Label Created By') ,
234 'description' => 'FK to civicrm_contact, who created this label layout',
235 'FKClassName' => 'CRM_Contact_DAO_Contact',
238 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
240 return Civi
::$statics[__CLASS__
]['fields'];
243 * Return a mapping from field-name to the corresponding key (as used in fields()).
246 * Array(string $name => string $uniqueName).
248 static function &fieldKeys() {
249 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
250 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
252 return Civi
::$statics[__CLASS__
]['fieldKeys'];
255 * Returns the names of this table
259 static function getTableName() {
260 return self
::$_tableName;
263 * Returns if this table needs to be logged
271 * Returns the list of fields that can be imported
273 * @param bool $prefix
277 static function &import($prefix = false) {
278 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'print_label', $prefix, array());
282 * Returns the list of fields that can be exported
284 * @param bool $prefix
288 static function &export($prefix = false) {
289 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'print_label', $prefix, array());