5 * @copyright CiviCRM LLC (c) 2004-2018
7 * Generated from xml/schema/CRM/Core/PrintLabel.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:60a1aaca1bbf19fe5b752afa03e8fd34)
13 * Database access object for the PrintLabel entity.
15 class CRM_Core_DAO_PrintLabel
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 static $_tableName = 'civicrm_print_label';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
37 * User title for for this label layout
44 * variable name/programmatic handle for this field.
51 * Description of this label layout
58 * This refers to name column of civicrm_option_value row in name_badge option group
62 public $label_format_name;
65 * Implicit FK to civicrm_option_value row in NEW label_type option group
69 public $label_type_id;
72 * contains json encode configurations options
86 * Is this option active?
93 * Is this reserved label?
100 * FK to civicrm_contact, who created this label layout
109 public function __construct() {
110 $this->__table
= 'civicrm_print_label';
111 parent
::__construct();
115 * Returns foreign keys and entity references.
118 * [CRM_Core_Reference_Interface]
120 public static function getReferenceColumns() {
121 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
122 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
123 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'created_id', 'civicrm_contact', 'id');
124 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
126 return Civi
::$statics[__CLASS__
]['links'];
130 * Returns all the column names of this table
134 public static function &fields() {
135 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
136 Civi
::$statics[__CLASS__
]['fields'] = [
139 'type' => CRM_Utils_Type
::T_INT
,
140 'title' => ts('Print Label ID'),
142 'table_name' => 'civicrm_print_label',
143 'entity' => 'PrintLabel',
144 'bao' => 'CRM_Core_DAO_PrintLabel',
149 'type' => CRM_Utils_Type
::T_STRING
,
150 'title' => ts('Title'),
151 'description' => 'User title for for this label layout',
153 'size' => CRM_Utils_Type
::HUGE
,
154 'table_name' => 'civicrm_print_label',
155 'entity' => 'PrintLabel',
156 'bao' => 'CRM_Core_DAO_PrintLabel',
161 'type' => CRM_Utils_Type
::T_STRING
,
162 'title' => ts('Name'),
163 'description' => 'variable name/programmatic handle for this field.',
165 'size' => CRM_Utils_Type
::HUGE
,
166 'table_name' => 'civicrm_print_label',
167 'entity' => 'PrintLabel',
168 'bao' => 'CRM_Core_DAO_PrintLabel',
172 'name' => 'description',
173 'type' => CRM_Utils_Type
::T_TEXT
,
174 'title' => ts('Description'),
175 'description' => 'Description of this label layout',
176 'table_name' => 'civicrm_print_label',
177 'entity' => 'PrintLabel',
178 'bao' => 'CRM_Core_DAO_PrintLabel',
181 'label_format_name' => [
182 'name' => 'label_format_name',
183 'type' => CRM_Utils_Type
::T_STRING
,
184 'title' => ts('Label Format'),
185 'description' => 'This refers to name column of civicrm_option_value row in name_badge option group',
187 'size' => CRM_Utils_Type
::HUGE
,
188 'table_name' => 'civicrm_print_label',
189 'entity' => 'PrintLabel',
190 'bao' => 'CRM_Core_DAO_PrintLabel',
195 'pseudoconstant' => [
196 'optionGroupName' => 'name_badge',
197 'optionEditPath' => 'civicrm/admin/options/name_badge',
201 'name' => 'label_type_id',
202 'type' => CRM_Utils_Type
::T_INT
,
203 'title' => ts('Label Type'),
204 'description' => 'Implicit FK to civicrm_option_value row in NEW label_type option group',
205 'table_name' => 'civicrm_print_label',
206 'entity' => 'PrintLabel',
207 'bao' => 'CRM_Core_DAO_PrintLabel',
212 'pseudoconstant' => [
213 'optionGroupName' => 'label_type',
214 'optionEditPath' => 'civicrm/admin/options/label_type',
219 'type' => CRM_Utils_Type
::T_LONGTEXT
,
220 'title' => ts('Data'),
221 'description' => 'contains json encode configurations options',
222 'table_name' => 'civicrm_print_label',
223 'entity' => 'PrintLabel',
224 'bao' => 'CRM_Core_DAO_PrintLabel',
226 'serialize' => self
::SERIALIZE_JSON
,
229 'name' => 'is_default',
230 'type' => CRM_Utils_Type
::T_BOOLEAN
,
231 'title' => ts('Label is Default?'),
232 'description' => 'Is this default?',
234 'table_name' => 'civicrm_print_label',
235 'entity' => 'PrintLabel',
236 'bao' => 'CRM_Core_DAO_PrintLabel',
240 'name' => 'is_active',
241 'type' => CRM_Utils_Type
::T_BOOLEAN
,
242 'title' => ts('Label Is Active?'),
243 'description' => 'Is this option active?',
245 'table_name' => 'civicrm_print_label',
246 'entity' => 'PrintLabel',
247 'bao' => 'CRM_Core_DAO_PrintLabel',
251 'name' => 'is_reserved',
252 'type' => CRM_Utils_Type
::T_BOOLEAN
,
253 'title' => ts('Is Label Reserved?'),
254 'description' => 'Is this reserved label?',
256 'table_name' => 'civicrm_print_label',
257 'entity' => 'PrintLabel',
258 'bao' => 'CRM_Core_DAO_PrintLabel',
262 'name' => 'created_id',
263 'type' => CRM_Utils_Type
::T_INT
,
264 'title' => ts('Label Created By'),
265 'description' => 'FK to civicrm_contact, who created this label layout',
266 'table_name' => 'civicrm_print_label',
267 'entity' => 'PrintLabel',
268 'bao' => 'CRM_Core_DAO_PrintLabel',
270 'FKClassName' => 'CRM_Contact_DAO_Contact',
273 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
275 return Civi
::$statics[__CLASS__
]['fields'];
279 * Return a mapping from field-name to the corresponding key (as used in fields()).
282 * Array(string $name => string $uniqueName).
284 public static function &fieldKeys() {
285 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
286 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
288 return Civi
::$statics[__CLASS__
]['fieldKeys'];
292 * Returns the names of this table
296 public static function getTableName() {
297 return self
::$_tableName;
301 * Returns if this table needs to be logged
305 public function getLog() {
310 * Returns the list of fields that can be imported
312 * @param bool $prefix
316 public static function &import($prefix = FALSE) {
317 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'print_label', $prefix, []);
322 * Returns the list of fields that can be exported
324 * @param bool $prefix
328 public static function &export($prefix = FALSE) {
329 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'print_label', $prefix, []);
334 * Returns the list of indices
336 * @param bool $localize
340 public static function indices($localize = TRUE) {
342 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;