<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Core_OptionValue {
/**
- * Static field for all the option value information that we can potentially export
+ * Static field for all the option value information that we can potentially export.
*
* @var array
- * @static
*/
static $_exportableFields = NULL;
/**
- * Static field for all the option value information that we can potentially export
+ * Static field for all the option value information that we can potentially export.
*
* @var array
- * @static
*/
static $_importableFields = NULL;
/**
- * Static field for all the option value information that we can potentially export
+ * Static field for all the option value information that we can potentially export.
*
* @var array
- * @static
*/
static $_fields = NULL;
*
* @param array $groupParams
* Array containing group fields whose option-values is to retrieved.
- * @param string $orderBy
- * For orderBy clause.
* @param array $links
* Has links like edit, delete, disable ..etc.
+ * @param string $orderBy
+ * For orderBy clause.
*
* @return array
- * of option-values
+ * Array of option-values
*
- * @static
*/
public static function getRows($groupParams, $links, $orderBy = 'weight') {
$optionValue = array();
* @param array $groupParams
* Array containing group fields whose option-values is to retrieved/saved.
* @param $action
- * @param int $optionValueIDHas the id of the optionValue being edited, disabled ..etc.
+ * @param int $optionValueID Has the id of the optionValue being edited, disabled ..etc.
* Has the id of the optionValue being edited, disabled ..etc.
*
* @return CRM_Core_DAO_OptionValue
*
- * @static
*/
public static function addOptionValue(&$params, &$groupParams, &$action, &$optionValueID) {
$params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE);
$fieldValues = array('option_group_id' => $optionGroupID);
// use the next available value
/* CONVERT(value, DECIMAL) is used to convert varchar
- field 'value' to decimal->integer */
+ field 'value' to decimal->integer */
$params['value'] = (int) CRM_Utils_Weight::getDefaultWeight('CRM_Core_DAO_OptionValue',
$fieldValues,
}
/**
- * Check if there is a record with the same name in the db
+ * Check if there is a record with the same name in the db.
*
* @param string $value
* The value of the field we are checking.
* @param string $fieldName
* The name of the field in the DAO.
*
- * @return boolean
+ * @return bool
* true if object exists
- * @static
*/
public static function optionExists($value, $daoName, $daoID, $optionGroupID, $fieldName = 'name') {
$object = new $daoName();
}
/**
- * Check if there is a record with the same name in the db
+ * Check if there is a record with the same name in the db.
*
* @param string $mode
* @param string $contactType
*
- * @return boolean
+ * @return bool
* true if object exists
- * @static
*/
public static function getFields($mode = '', $contactType = 'Individual') {
$key = "$mode $contactType";
$nameTitle = array(
'payment_instrument' => array(
'name' => 'payment_instrument',
- 'title' => ts('Payment Instrument'),
+ 'title' => ts('Payment Method'),
'headerPattern' => '/^payment|(p(ayment\s)?instrument)$/i',
),
);
'Individual',
'Household',
'Organization',
- 'All'
+ 'All',
))) {
$nameTitle = array(
'addressee' => array(
* @param string $orderBy
* For orderBy clause.
*
- * @param bool $isActiveDo you want only active option values?.
- * Do you want only active option values?.
+ * @param bool $isActive Do you want only active option values?
*
* @return array
- * of option-values
+ * Array of option-values
*
- * @static
*/
public static function getValues($groupParams, &$values, $orderBy = 'weight', $isActive = FALSE) {
if (empty($groupParams)) {
);
}
}
+
}