3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
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-2016
31 * Generated from xml/schema/CRM/Core/Extension.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:9f05903fb26f373b3f7715b2a5e90ce6)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_Extension
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_extension';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
63 * Fully qualified extension name
75 * Short, printable name
87 * Revision code of the database schema; the format is module-defined
91 public $schema_version;
93 * Is this extension active?
101 * @return civicrm_extension
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',
124 'type' => CRM_Utils_Type
::T_STRING
,
125 'title' => ts('Type') ,
128 'size' => CRM_Utils_Type
::EIGHT
,
132 'pseudoconstant' => array(
133 'callback' => 'CRM_Core_SelectValues::getExtensionTypes',
136 'full_name' => array(
137 'name' => 'full_name',
138 'type' => CRM_Utils_Type
::T_STRING
,
139 'title' => ts('Key') ,
140 'description' => 'Fully qualified extension name',
143 'size' => CRM_Utils_Type
::HUGE
,
147 'type' => CRM_Utils_Type
::T_STRING
,
148 'title' => ts('Name') ,
149 'description' => 'Short name',
151 'size' => CRM_Utils_Type
::HUGE
,
153 'where' => 'civicrm_extension.name',
154 'headerPattern' => '',
160 'type' => CRM_Utils_Type
::T_STRING
,
161 'title' => ts('Label') ,
162 'description' => 'Short, printable name',
164 'size' => CRM_Utils_Type
::HUGE
,
166 'where' => 'civicrm_extension.label',
167 'headerPattern' => '',
173 'type' => CRM_Utils_Type
::T_STRING
,
174 'title' => ts('File') ,
175 'description' => 'Primary PHP file',
177 'size' => CRM_Utils_Type
::HUGE
,
179 'where' => 'civicrm_extension.file',
180 'headerPattern' => '',
184 'schema_version' => array(
185 'name' => 'schema_version',
186 'type' => CRM_Utils_Type
::T_STRING
,
187 'title' => ts('Schema Version') ,
188 'description' => 'Revision code of the database schema; the format is module-defined',
190 'size' => CRM_Utils_Type
::BIG
,
192 'where' => 'civicrm_extension.schema_version',
193 'headerPattern' => '',
197 'is_active' => array(
198 'name' => 'is_active',
199 'type' => CRM_Utils_Type
::T_BOOLEAN
,
200 'title' => ts('Extension is Active?') ,
201 'description' => 'Is this extension active?',
205 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
207 return Civi
::$statics[__CLASS__
]['fields'];
210 * Return a mapping from field-name to the corresponding key (as used in fields()).
213 * Array(string $name => string $uniqueName).
215 static function &fieldKeys() {
216 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
217 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
219 return Civi
::$statics[__CLASS__
]['fieldKeys'];
222 * Returns the names of this table
226 static function getTableName() {
227 return self
::$_tableName;
230 * Returns if this table needs to be logged
238 * Returns the list of fields that can be imported
240 * @param bool $prefix
244 static function &import($prefix = false) {
245 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'extension', $prefix, array());
249 * Returns the list of fields that can be exported
251 * @param bool $prefix
255 static function &export($prefix = false) {
256 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'extension', $prefix, array());