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/Friend/Friend.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:62111759b7ebef1f78bd30c04c2086ba)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Friend_DAO_Friend
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_tell_friend';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
58 * Name of table where item being referenced is stored.
64 * Foreign key to the referenced item.
75 * Introductory message to contributor or participant displayed on the Tell a Friend form.
81 * Suggested message to friends, provided as default on the Tell A Friend form.
85 public $suggested_message;
87 * URL for general info about the organization - included in the email sent to friends.
93 * Text for Tell a Friend thank you page header and HTML title.
97 public $thankyou_title;
99 * Thank you message displayed on success page.
103 public $thankyou_text;
112 * @return civicrm_tell_friend
114 function __construct() {
115 $this->__table
= 'civicrm_tell_friend';
116 parent
::__construct();
119 * Returns foreign keys and entity references
122 * [CRM_Core_Reference_Interface]
124 static function getReferenceColumns() {
125 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
126 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
127 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Dynamic(self
::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
128 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
130 return Civi
::$statics[__CLASS__
]['links'];
133 * Returns all the column names of this table
137 static function &fields() {
138 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
139 Civi
::$statics[__CLASS__
]['fields'] = array(
142 'type' => CRM_Utils_Type
::T_INT
,
143 'title' => ts('Friend ID') ,
144 'description' => 'Friend ID',
147 'entity_table' => array(
148 'name' => 'entity_table',
149 'type' => CRM_Utils_Type
::T_STRING
,
150 'title' => ts('Entity Table') ,
151 'description' => 'Name of table where item being referenced is stored.',
154 'size' => CRM_Utils_Type
::BIG
,
156 'entity_id' => array(
157 'name' => 'entity_id',
158 'type' => CRM_Utils_Type
::T_INT
,
159 'title' => ts('Entity ID') ,
160 'description' => 'Foreign key to the referenced item.',
165 'type' => CRM_Utils_Type
::T_STRING
,
166 'title' => ts('Title') ,
168 'size' => CRM_Utils_Type
::HUGE
,
175 'type' => CRM_Utils_Type
::T_TEXT
,
176 'title' => ts('Intro') ,
177 'description' => 'Introductory message to contributor or participant displayed on the Tell a Friend form.',
182 'suggested_message' => array(
183 'name' => 'suggested_message',
184 'type' => CRM_Utils_Type
::T_TEXT
,
185 'title' => ts('Suggested Message') ,
186 'description' => 'Suggested message to friends, provided as default on the Tell A Friend form.',
191 'general_link' => array(
192 'name' => 'general_link',
193 'type' => CRM_Utils_Type
::T_STRING
,
194 'title' => ts('General Link') ,
195 'description' => 'URL for general info about the organization - included in the email sent to friends.',
197 'size' => CRM_Utils_Type
::HUGE
,
199 'where' => 'civicrm_tell_friend.general_link',
200 'headerPattern' => '',
207 'thankyou_title' => array(
208 'name' => 'thankyou_title',
209 'type' => CRM_Utils_Type
::T_STRING
,
210 'title' => ts('Thank You Title') ,
211 'description' => 'Text for Tell a Friend thank you page header and HTML title.',
213 'size' => CRM_Utils_Type
::HUGE
,
218 'thankyou_text' => array(
219 'name' => 'thankyou_text',
220 'type' => CRM_Utils_Type
::T_TEXT
,
221 'title' => ts('Thank You Text') ,
222 'description' => 'Thank you message displayed on success page.',
227 'is_active' => array(
228 'name' => 'is_active',
229 'type' => CRM_Utils_Type
::T_BOOLEAN
,
230 'title' => ts('Enabled?') ,
232 'type' => 'CheckBox',
236 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
238 return Civi
::$statics[__CLASS__
]['fields'];
241 * Return a mapping from field-name to the corresponding key (as used in fields()).
244 * Array(string $name => string $uniqueName).
246 static function &fieldKeys() {
247 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
248 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
250 return Civi
::$statics[__CLASS__
]['fieldKeys'];
253 * Returns the names of this table
257 static function getTableName() {
258 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
261 * Returns if this table needs to be logged
269 * Returns the list of fields that can be imported
271 * @param bool $prefix
275 static function &import($prefix = false) {
276 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'tell_friend', $prefix, array());
280 * Returns the list of fields that can be exported
282 * @param bool $prefix
286 static function &export($prefix = false) {
287 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'tell_friend', $prefix, array());