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/Extension.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:fdbe27f0b1587c2b4806d98f474e78ed)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_Extension constructor.
40 class CRM_Core_DAO_Extension
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_extension';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
65 * Fully qualified extension name
77 * Short, printable name
89 * Revision code of the database schema; the format is module-defined
93 public $schema_version;
95 * Is this extension active?
103 function __construct() {
104 $this->__table
= 'civicrm_extension';
105 parent
::__construct();
108 * Returns all the column names of this table
112 static function &fields() {
113 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
114 Civi
::$statics[__CLASS__
]['fields'] = array(
117 'type' => CRM_Utils_Type
::T_INT
,
118 'title' => ts('Extension ID') ,
119 'description' => 'Local Extension ID',
121 'table_name' => 'civicrm_extension',
122 'entity' => 'Extension',
123 'bao' => 'CRM_Core_BAO_Extension',
128 'type' => CRM_Utils_Type
::T_STRING
,
129 'title' => ts('Type') ,
132 'size' => CRM_Utils_Type
::EIGHT
,
133 'table_name' => 'civicrm_extension',
134 'entity' => 'Extension',
135 'bao' => 'CRM_Core_BAO_Extension',
140 'pseudoconstant' => array(
141 'callback' => 'CRM_Core_SelectValues::getExtensionTypes',
144 'full_name' => array(
145 'name' => 'full_name',
146 'type' => CRM_Utils_Type
::T_STRING
,
147 'title' => ts('Key') ,
148 'description' => 'Fully qualified extension name',
151 'size' => CRM_Utils_Type
::HUGE
,
152 'table_name' => 'civicrm_extension',
153 'entity' => 'Extension',
154 'bao' => 'CRM_Core_BAO_Extension',
159 'type' => CRM_Utils_Type
::T_STRING
,
160 'title' => ts('Name') ,
161 'description' => 'Short name',
163 'size' => CRM_Utils_Type
::HUGE
,
165 'where' => 'civicrm_extension.name',
166 'headerPattern' => '',
169 'table_name' => 'civicrm_extension',
170 'entity' => 'Extension',
171 'bao' => 'CRM_Core_BAO_Extension',
176 'type' => CRM_Utils_Type
::T_STRING
,
177 'title' => ts('Label') ,
178 'description' => 'Short, printable name',
180 'size' => CRM_Utils_Type
::HUGE
,
182 'where' => 'civicrm_extension.label',
183 'headerPattern' => '',
186 'table_name' => 'civicrm_extension',
187 'entity' => 'Extension',
188 'bao' => 'CRM_Core_BAO_Extension',
193 'type' => CRM_Utils_Type
::T_STRING
,
194 'title' => ts('File') ,
195 'description' => 'Primary PHP file',
197 'size' => CRM_Utils_Type
::HUGE
,
199 'where' => 'civicrm_extension.file',
200 'headerPattern' => '',
203 'table_name' => 'civicrm_extension',
204 'entity' => 'Extension',
205 'bao' => 'CRM_Core_BAO_Extension',
208 'schema_version' => array(
209 'name' => 'schema_version',
210 'type' => CRM_Utils_Type
::T_STRING
,
211 'title' => ts('Schema Version') ,
212 'description' => 'Revision code of the database schema; the format is module-defined',
214 'size' => CRM_Utils_Type
::BIG
,
216 'where' => 'civicrm_extension.schema_version',
217 'headerPattern' => '',
220 'table_name' => 'civicrm_extension',
221 'entity' => 'Extension',
222 'bao' => 'CRM_Core_BAO_Extension',
225 'is_active' => array(
226 'name' => 'is_active',
227 'type' => CRM_Utils_Type
::T_BOOLEAN
,
228 'title' => ts('Extension is Active?') ,
229 'description' => 'Is this extension active?',
231 'table_name' => 'civicrm_extension',
232 'entity' => 'Extension',
233 'bao' => 'CRM_Core_BAO_Extension',
237 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
239 return Civi
::$statics[__CLASS__
]['fields'];
242 * Return a mapping from field-name to the corresponding key (as used in fields()).
245 * Array(string $name => string $uniqueName).
247 static function &fieldKeys() {
248 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
249 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
251 return Civi
::$statics[__CLASS__
]['fieldKeys'];
254 * Returns the names of this table
258 static function getTableName() {
259 return self
::$_tableName;
262 * Returns if this table needs to be logged
270 * Returns the list of fields that can be imported
272 * @param bool $prefix
276 static function &import($prefix = false) {
277 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'extension', $prefix, array());
281 * Returns the list of fields that can be exported
283 * @param bool $prefix
287 static function &export($prefix = false) {
288 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'extension', $prefix, array());