at top of Premiums section of page. Text and HTML allowed. * * @var string|null * (SQL type: text) * Note that values will be retrieved from the database as a string. */ public $premiums_intro_text; /** * This email address is included in receipts if it is populated and a premium has been selected. * * @var string|null * (SQL type: varchar(100)) * Note that values will be retrieved from the database as a string. */ public $premiums_contact_email; /** * This phone number is included in receipts if it is populated and a premium has been selected. * * @var string|null * (SQL type: varchar(50)) * Note that values will be retrieved from the database as a string. */ public $premiums_contact_phone; /** * Boolean. Should we automatically display minimum contribution amount text after the premium descriptions. * * @var bool|string * (SQL type: tinyint) * Note that values will be retrieved from the database as a string. */ public $premiums_display_min_contribution; /** * Label displayed for No Thank-you option in premiums block (e.g. No thank you) * * @var string|null * (SQL type: varchar(255)) * Note that values will be retrieved from the database as a string. */ public $premiums_nothankyou_label; /** * @var int|string|null * (SQL type: int unsigned) * Note that values will be retrieved from the database as a string. */ public $premiums_nothankyou_position; /** * Class constructor. */ public function __construct() { $this->__table = 'civicrm_premiums'; parent::__construct(); } /** * Returns localized title of this entity. * * @param bool $plural * Whether to return the plural version of the title. */ public static function getEntityTitle($plural = FALSE) { return $plural ? ts('Premiums') : ts('Premium'); } /** * Returns foreign keys and entity references. * * @return array * [CRM_Core_Reference_Interface] */ public static function getReferenceColumns() { if (!isset(Civi::$statics[__CLASS__]['links'])) { Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__); Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Dynamic(self::getTableName(), 'entity_id', NULL, 'id', 'entity_table'); CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']); } return Civi::$statics[__CLASS__]['links']; } /** * Returns all the column names of this table * * @return array */ public static function &fields() { if (!isset(Civi::$statics[__CLASS__]['fields'])) { Civi::$statics[__CLASS__]['fields'] = [ 'id' => [ 'name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Premium ID'), 'required' => TRUE, 'where' => 'civicrm_premiums.id', 'table_name' => 'civicrm_premiums', 'entity' => 'Premium', 'bao' => 'CRM_Contribute_BAO_Premium', 'localizable' => 0, 'html' => [ 'type' => 'Number', ], 'readonly' => TRUE, 'add' => '1.4', ], 'entity_table' => [ 'name' => 'entity_table', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Premium Entity'), 'description' => ts('Joins these premium settings to another object. Always civicrm_contribution_page for now.'), 'required' => TRUE, 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, 'where' => 'civicrm_premiums.entity_table', 'table_name' => 'civicrm_premiums', 'entity' => 'Premium', 'bao' => 'CRM_Contribute_BAO_Premium', 'localizable' => 0, 'add' => '1.4', ], 'entity_id' => [ 'name' => 'entity_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Premium entity ID'), 'required' => TRUE, 'where' => 'civicrm_premiums.entity_id', 'table_name' => 'civicrm_premiums', 'entity' => 'Premium', 'bao' => 'CRM_Contribute_BAO_Premium', 'localizable' => 0, 'add' => '1.4', ], 'premiums_active' => [ 'name' => 'premiums_active', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Is Premium Active?'), 'description' => ts('Is the Premiums feature enabled for this page?'), 'required' => TRUE, 'where' => 'civicrm_premiums.premiums_active', 'default' => '0', 'table_name' => 'civicrm_premiums', 'entity' => 'Premium', 'bao' => 'CRM_Contribute_BAO_Premium', 'localizable' => 0, 'add' => '1.4', ], 'premiums_intro_title' => [ 'name' => 'premiums_intro_title', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Title for Premiums section'), 'description' => ts('Title for Premiums section.'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, 'where' => 'civicrm_premiums.premiums_intro_title', 'table_name' => 'civicrm_premiums', 'entity' => 'Premium', 'bao' => 'CRM_Contribute_BAO_Premium', 'localizable' => 1, 'add' => '1.4', ], 'premiums_intro_text' => [ 'name' => 'premiums_intro_text', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Premium Introductory Text'), 'description' => ts('Displayed in