3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
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-2015
31 * Generated from xml/schema/CRM/Core/Component.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
34 require_once 'CRM/Core/DAO.php';
35 require_once 'CRM/Utils/Type.php';
36 class CRM_Core_DAO_Component
extends CRM_Core_DAO
{
38 * static instance to hold the table name
42 static $_tableName = 'civicrm_component';
44 * static instance to hold the field values
48 static $_fields = null;
50 * static instance to hold the keys used in $_fields for each field.
54 static $_fieldKeys = null;
56 * static instance to hold the FK relationships
60 static $_links = null;
62 * static instance to hold the values that can
67 static $_import = null;
69 * static instance to hold the values that can
74 static $_export = null;
76 * static value to see if we should log any modifications to
77 * this table in the civicrm_log table
89 * Name of the component.
95 * Path to components main directory in a form of a class
104 * @return civicrm_component
106 function __construct() {
107 $this->__table
= 'civicrm_component';
108 parent
::__construct();
111 * Returns all the column names of this table
115 static function &fields() {
116 if (!(self
::$_fields)) {
117 self
::$_fields = array(
120 'type' => CRM_Utils_Type
::T_INT
,
121 'description' => 'Component ID',
126 'type' => CRM_Utils_Type
::T_STRING
,
127 'title' => ts('Component name') ,
128 'description' => 'Name of the component.',
131 'size' => CRM_Utils_Type
::BIG
,
133 'namespace' => array(
134 'name' => 'namespace',
135 'type' => CRM_Utils_Type
::T_STRING
,
136 'title' => ts('Namespace reserved for component.') ,
137 'description' => 'Path to components main directory in a form of a class
141 'size' => CRM_Utils_Type
::HUGE
,
145 return self
::$_fields;
148 * Returns an array containing, for each field, the arary key used for that
149 * field in self::$_fields.
153 static function &fieldKeys() {
154 if (!(self
::$_fieldKeys)) {
155 self
::$_fieldKeys = array(
158 'namespace' => 'namespace',
161 return self
::$_fieldKeys;
164 * Returns the names of this table
168 static function getTableName() {
169 return self
::$_tableName;
172 * Returns if this table needs to be logged
180 * Returns the list of fields that can be imported
182 * @param bool $prefix
186 static function &import($prefix = false) {
187 if (!(self
::$_import)) {
188 self
::$_import = array();
189 $fields = self
::fields();
190 foreach($fields as $name => $field) {
191 if (CRM_Utils_Array
::value('import', $field)) {
193 self
::$_import['component'] = & $fields[$name];
195 self
::$_import[$name] = & $fields[$name];
200 return self
::$_import;
203 * Returns the list of fields that can be exported
205 * @param bool $prefix
209 static function &export($prefix = false) {
210 if (!(self
::$_export)) {
211 self
::$_export = array();
212 $fields = self
::fields();
213 foreach($fields as $name => $field) {
214 if (CRM_Utils_Array
::value('export', $field)) {
216 self
::$_export['component'] = & $fields[$name];
218 self
::$_export[$name] = & $fields[$name];
223 return self
::$_export;