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/Contribute/Widget.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:0c274425d81e53c5a1f1a4f4e3078ce3)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Contribute_DAO_Widget
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_contribution_widget';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
58 * The Contribution Page which triggered this contribution
62 public $contribution_page_id;
64 * Is this property active?
108 public $color_button;
118 public $color_main_text;
128 public $color_main_bg;
138 public $color_about_link;
143 public $color_homepage_link;
147 * @return civicrm_contribution_widget
149 function __construct() {
150 $this->__table
= 'civicrm_contribution_widget';
151 parent
::__construct();
154 * Returns foreign keys and entity references
157 * [CRM_Core_Reference_Interface]
159 static function getReferenceColumns() {
160 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
161 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
162 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'contribution_page_id', 'civicrm_contribution_page', 'id');
163 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
165 return Civi
::$statics[__CLASS__
]['links'];
168 * Returns all the column names of this table
172 static function &fields() {
173 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
174 Civi
::$statics[__CLASS__
]['fields'] = array(
177 'type' => CRM_Utils_Type
::T_INT
,
178 'title' => ts('Widget ID') ,
179 'description' => 'Contribution Id',
182 'contribution_page_id' => array(
183 'name' => 'contribution_page_id',
184 'type' => CRM_Utils_Type
::T_INT
,
185 'title' => ts('Contribution Page') ,
186 'description' => 'The Contribution Page which triggered this contribution',
187 'FKClassName' => 'CRM_Contribute_DAO_ContributionPage',
189 'is_active' => array(
190 'name' => 'is_active',
191 'type' => CRM_Utils_Type
::T_BOOLEAN
,
192 'title' => ts('Enabled?') ,
193 'description' => 'Is this property active?',
197 'type' => CRM_Utils_Type
::T_STRING
,
198 'title' => ts('Widget Title') ,
199 'description' => 'Widget title.',
201 'size' => CRM_Utils_Type
::HUGE
,
204 'name' => 'url_logo',
205 'type' => CRM_Utils_Type
::T_STRING
,
206 'title' => ts('Widget Image Url') ,
207 'description' => 'URL to Widget logo',
209 'size' => CRM_Utils_Type
::HUGE
,
211 'button_title' => array(
212 'name' => 'button_title',
213 'type' => CRM_Utils_Type
::T_STRING
,
214 'title' => ts('Button Title') ,
215 'description' => 'Button title.',
217 'size' => CRM_Utils_Type
::HUGE
,
221 'type' => CRM_Utils_Type
::T_TEXT
,
222 'title' => ts('Description') ,
223 'description' => 'About description.',
225 'url_homepage' => array(
226 'name' => 'url_homepage',
227 'type' => CRM_Utils_Type
::T_STRING
,
228 'title' => ts('Homepage Url') ,
229 'description' => 'URL to Homepage.',
231 'size' => CRM_Utils_Type
::HUGE
,
233 'color_title' => array(
234 'name' => 'color_title',
235 'type' => CRM_Utils_Type
::T_STRING
,
236 'title' => ts('Title Color') ,
238 'size' => CRM_Utils_Type
::TWELVE
,
240 'color_button' => array(
241 'name' => 'color_button',
242 'type' => CRM_Utils_Type
::T_STRING
,
243 'title' => ts('Button Colour') ,
245 'size' => CRM_Utils_Type
::TWELVE
,
247 'color_bar' => array(
248 'name' => 'color_bar',
249 'type' => CRM_Utils_Type
::T_STRING
,
250 'title' => ts('Bar Color') ,
252 'size' => CRM_Utils_Type
::TWELVE
,
254 'color_main_text' => array(
255 'name' => 'color_main_text',
256 'type' => CRM_Utils_Type
::T_STRING
,
257 'title' => ts('Main Text Color') ,
259 'size' => CRM_Utils_Type
::TWELVE
,
261 'color_main' => array(
262 'name' => 'color_main',
263 'type' => CRM_Utils_Type
::T_STRING
,
264 'title' => ts('Main Colour') ,
266 'size' => CRM_Utils_Type
::TWELVE
,
268 'color_main_bg' => array(
269 'name' => 'color_main_bg',
270 'type' => CRM_Utils_Type
::T_STRING
,
271 'title' => ts('Backgroup Color') ,
273 'size' => CRM_Utils_Type
::TWELVE
,
276 'name' => 'color_bg',
277 'type' => CRM_Utils_Type
::T_STRING
,
278 'title' => ts('Other Backgroun Colour') ,
280 'size' => CRM_Utils_Type
::TWELVE
,
282 'color_about_link' => array(
283 'name' => 'color_about_link',
284 'type' => CRM_Utils_Type
::T_STRING
,
285 'title' => ts('About Link Colour') ,
287 'size' => CRM_Utils_Type
::TWELVE
,
289 'color_homepage_link' => array(
290 'name' => 'color_homepage_link',
291 'type' => CRM_Utils_Type
::T_STRING
,
292 'title' => ts('Homepage Link Colour') ,
294 'size' => CRM_Utils_Type
::TWELVE
,
297 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
299 return Civi
::$statics[__CLASS__
]['fields'];
302 * Return a mapping from field-name to the corresponding key (as used in fields()).
305 * Array(string $name => string $uniqueName).
307 static function &fieldKeys() {
308 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
309 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
311 return Civi
::$statics[__CLASS__
]['fieldKeys'];
314 * Returns the names of this table
318 static function getTableName() {
319 return self
::$_tableName;
322 * Returns if this table needs to be logged
330 * Returns the list of fields that can be imported
332 * @param bool $prefix
336 static function &import($prefix = false) {
337 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'contribution_widget', $prefix, array());
341 * Returns the list of fields that can be exported
343 * @param bool $prefix
347 static function &export($prefix = false) {
348 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'contribution_widget', $prefix, array());