<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
/**
* Class constructor
*/
- function __construct() {
+ public function __construct() {
parent::__construct();
}
/**
* Fetch object based on array of properties
*
- * @param array $params (reference ) an assoc array of name/value pairs
- * @param array $defaults (reference ) an assoc array to hold the flattened values
+ * @param array $params
+ * (reference ) an assoc array of name/value pairs.
+ * @param array $defaults
+ * (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contribute_BAO_ManagePremium object
- * @access public
* @static
*/
- static function retrieve(&$params, &$defaults) {
+ public static function retrieve(&$params, &$defaults) {
$premium = new CRM_Contribute_DAO_Product();
$premium->copyValues($params);
if ($premium->find(TRUE)) {
/**
* Update the is_active flag in the db
*
- * @param int $id id of the database record
- * @param boolean $is_active value we want to set the is_active field
+ * @param int $id
+ * Id of the database record.
+ * @param bool $is_active
+ * Value we want to set the is_active field.
*
* @return Object DAO object on sucess, null otherwise
* @static
*/
- static function setIsActive($id, $is_active) {
+ public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Contribute_DAO_Premium', $id, 'premiums_active ', $is_active);
}
*
* @static
*/
- static function del($premiumID) {
+ public static function del($premiumID) {
//check dependencies
- //delete from financial Type table
+ //delete from financial Type table
$premium = new CRM_Contribute_DAO_Premium();
$premium->id = $premiumID;
$premium->delete();
*
* @static
*/
- static function buildPremiumBlock(&$form, $pageID, $formItems = FALSE, $selectedProductID = NULL, $selectedOption = NULL) {
+ public static function buildPremiumBlock(&$form, $pageID, $formItems = FALSE, $selectedProductID = NULL, $selectedOption = NULL) {
$form->add('hidden', "selectProduct", $selectedProductID, array('id' => 'selectProduct'));
$dao = new CRM_Contribute_DAO_Premium();
*
* @static
*/
- function buildPremiumPreviewBlock($form, $productID, $premiumProductID = NULL) {
+ public function buildPremiumPreviewBlock($form, $productID, $premiumProductID = NULL) {
if ($premiumProductID) {
$dao = new CRM_Contribute_DAO_PremiumsProduct();
$dao->id = $premiumProductID;
*
* @static
*/
- static function deletePremium($contributionPageID) {
+ public static function deletePremium($contributionPageID) {
if (!$contributionPageID) {
return;
}
*
* @return array product and option arrays
* @static
- * @access public
*/
- static function getPremiumProductInfo() {
+ public static function getPremiumProductInfo() {
if (!self::$productInfo) {
$products = $options = array();
return self::$productInfo;
}
}
-