+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*
* the function extract all the params it needs to initialize the create a
* price field object. the params array could contain additional unused name/value
*
* the function extract all the params it needs to initialize the create a
* price field object. the params array could contain additional unused name/value
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceField', $id, 'is_active', $is_active);
}
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceField', $id, 'is_active', $is_active);
}
public static function freezeIfEnabled(&$element, $fieldOptions) {
if (!empty($fieldOptions['is_full'])) {
$element->freeze();
public static function freezeIfEnabled(&$element, $fieldOptions) {
if (!empty($fieldOptions['is_full'])) {
$element->freeze();
$extra = array();
if (!empty($qf->_quickConfig) && !empty($qf->_contributionAmount)) {
foreach ($fieldOptions as &$fieldOption) {
$extra = array();
if (!empty($qf->_quickConfig) && !empty($qf->_contributionAmount)) {
foreach ($fieldOptions as &$fieldOption) {
// CRM-6902 - Add "max" option for a price set field
if (in_array($optionKey, $freezeOptions)) {
// CRM-6902 - Add "max" option for a price set field
if (in_array($optionKey, $freezeOptions)) {
// CRM-14696 - Improve display for sold out price set options
$element->setLabel($label . ' <span class="sold-out-option">' . ts('Sold out') . '</span>');
}
// CRM-14696 - Improve display for sold out price set options
$element->setLabel($label . ' <span class="sold-out-option">' . ts('Sold out') . '</span>');
}
$priceVal[$opt['id']] = implode($seperator, array($opt[$valueFieldName] + $taxAmount, $count, $max_value));
if (!in_array($opt['id'], $freezeOptions)) {
$priceVal[$opt['id']] = implode($seperator, array($opt[$valueFieldName] + $taxAmount, $count, $max_value));
if (!in_array($opt['id'], $freezeOptions)) {