*
* @param $ids
*
- * @return CRM_Price_DAO_PriceFieldValue object
- * @static
+ * @return CRM_Price_DAO_PriceFieldValue
*/
public static function add(&$params, $ids = array()) {
*
* @param $ids
*
- * @return CRM_Price_DAO_PriceFieldValue object
- * @static
+ * @return CRM_Price_DAO_PriceFieldValue
*/
public static function create(&$params, $ids = array()) {
$id = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('id', $ids));
if (!is_array($params) || empty($params)) {
- return;
+ return NULL;
}
- if(!$id && empty($params['name'])) {
+ if (!$id && empty($params['name'])) {
$params['name'] = strtolower(CRM_Utils_String::munge($params['label'], '_', 242));
}
- if ($id && !empty($params['weight'])) {
- if (isset($params['name'])) { unset($params['name']);
+ if ($id && !empty($params['weight'])) {
+ if (isset($params['name'])) {
+ unset($params['name']);
}
$oldWeight = NULL;
* @param array $defaults
* (reference ) an assoc array to hold the flattened values.
*
- * @return CRM_Price_DAO_PriceFieldValue object
- * @static
+ * @return CRM_Price_DAO_PriceFieldValue
*/
public static function retrieve(&$params, &$defaults) {
return CRM_Core_DAO::commonRetrieve('CRM_Price_DAO_PriceFieldValue', $params, $defaults);
* For order by, default weight.
* @param bool|int $isActive is_active, default false
*
- * @return array $values
+ * @return array
*
- * @static
*/
public static function getValues($fieldId, &$values, $orderBy = 'weight', $isActive = FALSE) {
$fieldValueDAO = new CRM_Price_DAO_PriceFieldValue();
* @param int $id
* Id of field option.
*
- * @return string name
- *
- * @static
+ * @return string
+ * name
*
*/
public static function getOptionLabel($id) {
* @param bool $is_active
* Value we want to set the is_active field.
*
- * @return Object DAO object on sucess, null otherwise
+ * @return Object
+ * DAO object on sucess, null otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceFieldValue', $id, 'is_active', $is_active);
* Price field id.
*
*
- * @static
*/
public static function deleteValues($fieldId) {
if (!$fieldId) {
* @param int $id
* Id.
*
- * @return boolean
+ * @return bool
*
- * @static
*/
public static function del($id) {
if (!$id) {
*
* @param int $entityId
* Id.
- * @param string $entityTableEntity table.
+ * @param string $entityTable table.
* Entity table.
- * @param string $financialTypeIDFinancial type id.
+ * @param string $financialTypeID type id.
* Financial type id.
*
- * @static
*/
public static function updateFinancialType($entityId, $entityTable, $financialTypeID) {
if (!$entityId || !$entityTable || !$financialTypeID) {