*/
protected $entity;
- /**
- * The id of the premium that we are proceessing.
- *
- * @var int
- */
- public $_premiumID = NULL;
-
- /**
- * @var CRM_Contribute_DAO_ContributionProduct
- */
- public $_productDAO = NULL;
-
/**
* The id of the note
*
CRM_Custom_Form_CustomData::setDefaultValues($this);
}
- /**
- * @param int $id
- * @todo - this function is a long way, non standard of saying $dao = new CRM_Contribute_DAO_ContributionProduct(); $dao->id = $id; $dao->find();
- */
- public function assignPremiumProduct($id) {
- $sql = "
-SELECT *
-FROM civicrm_contribution_product
-WHERE contribution_id = {$id}
-";
- $dao = CRM_Core_DAO::executeQuery($sql);
- if ($dao->fetch()) {
- $this->_premiumID = $dao->id;
- $this->_productDAO = $dao;
- }
- }
-
/**
* @return array
* Array of valid processors. The array resembles the DB table but also has 'object' as a key
return $this->getSubmittedValue('price_set_id');
}
+ /**
+ * @param int $id
+ * @todo - this function is a long way, non standard of saying $dao = new CRM_Contribute_DAO_ContributionProduct(); $dao->id = $id; $dao->find();
+ */
+ private function assignPremiumProduct($id): void {
+ $sql = "
+SELECT *
+FROM civicrm_contribution_product
+WHERE contribution_id = {$id}
+";
+ $dao = CRM_Core_DAO::executeQuery($sql);
+ if ($dao->fetch()) {
+ $this->_premiumID = $dao->id;
+ $this->_productDAO = $dao;
+ }
+ }
+
}