5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Core/Worldregion.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:8045c0ab7f128626a594fbb634e2f169)
13 * Database access object for the Worldregion entity.
15 class CRM_Core_DAO_Worldregion
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_worldregion';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = FALSE;
39 * Region name to be associated with countries
48 public function __construct() {
49 $this->__table
= 'civicrm_worldregion';
50 parent
::__construct();
54 * Returns localized title of this entity.
56 public static function getEntityTitle() {
57 return ts('Worldregions');
61 * Returns all the column names of this table
65 public static function &fields() {
66 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
67 Civi
::$statics[__CLASS__
]['fields'] = [
70 'type' => CRM_Utils_Type
::T_INT
,
71 'title' => ts('World Region ID'),
72 'description' => ts('Country Id'),
74 'where' => 'civicrm_worldregion.id',
75 'table_name' => 'civicrm_worldregion',
76 'entity' => 'Worldregion',
77 'bao' => 'CRM_Core_DAO_Worldregion',
83 'type' => CRM_Utils_Type
::T_STRING
,
84 'title' => ts('World Region'),
85 'description' => ts('Region name to be associated with countries'),
87 'size' => CRM_Utils_Type
::HUGE
,
88 'where' => 'civicrm_worldregion.name',
90 'table_name' => 'civicrm_worldregion',
91 'entity' => 'Worldregion',
92 'bao' => 'CRM_Core_DAO_Worldregion',
97 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
99 return Civi
::$statics[__CLASS__
]['fields'];
103 * Return a mapping from field-name to the corresponding key (as used in fields()).
106 * Array(string $name => string $uniqueName).
108 public static function &fieldKeys() {
109 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
110 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
112 return Civi
::$statics[__CLASS__
]['fieldKeys'];
116 * Returns the names of this table
120 public static function getTableName() {
121 return self
::$_tableName;
125 * Returns if this table needs to be logged
129 public function getLog() {
134 * Returns the list of fields that can be imported
136 * @param bool $prefix
140 public static function &import($prefix = FALSE) {
141 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'worldregion', $prefix, []);
146 * Returns the list of fields that can be exported
148 * @param bool $prefix
152 public static function &export($prefix = FALSE) {
153 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'worldregion', $prefix, []);
158 * Returns the list of indices
160 * @param bool $localize
164 public static function indices($localize = TRUE) {
166 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;