+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Contribute_BAO_Premium extends CRM_Contribute_DAO_Premium {
/**
- * Product information
+ * Product information.
* @var array
- * @static
*/
private static $productInfo;
/**
- * Class constructor
+ * Class constructor.
*/
public function __construct() {
parent::__construct();
}
/**
- * Fetch object based on array of properties
+ * 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.
*
- * @return CRM_Contribute_BAO_ManagePremium object
- * @static
+ * @return CRM_Contribute_BAO_ManagePremium
*/
public static function retrieve(&$params, &$defaults) {
$premium = new CRM_Contribute_DAO_Product();
}
/**
- * Update the is_active flag in the db
+ * Update the is_active flag in the db.
*
* @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
+ * @return Object
+ * DAO object on sucess, null otherwise
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Contribute_DAO_Premium', $id, 'premiums_active ', $is_active);
}
/**
- * Delete financial Types
+ * Delete financial Types.
*
* @param int $premiumID
*
- * @static
*/
public static function del($premiumID) {
//check dependencies
}
/**
- * Build Premium Block im Contribution Pages
+ * Build Premium Block im Contribution Pages.
*
* @param CRM_Core_Form $form
* @param int $pageID
* @param int $selectedProductID
* @param null $selectedOption
*
- * @static
*/
public static function buildPremiumBlock(&$form, $pageID, $formItems = FALSE, $selectedProductID = NULL, $selectedOption = NULL) {
$form->add('hidden', "selectProduct", $selectedProductID, array('id' => 'selectProduct'));
}
/**
- * Build Premium B im Contribution Pages
+ * Build Premium B im Contribution Pages.
*
* @param CRM_Core_Form $form
* @param int $productID
* @param int $premiumProductID
*
- * @static
*/
public function buildPremiumPreviewBlock($form, $productID, $premiumProductID = NULL) {
if ($premiumProductID) {
*
* @param int $contributionPageID
*
- * @static
*/
public static function deletePremium($contributionPageID) {
if (!$contributionPageID) {
}
/**
- * Retrieve premium product and their options
+ * Retrieve premium product and their options.
*
- * @return array product and option arrays
- * @static
+ * @return array
+ * product and option arrays
*/
public static function getPremiumProductInfo() {
if (!self::$productInfo) {
}
return self::$productInfo;
}
+
}