/** * Retrive the all values for given field id * * @param int $fieldId price_field_id * @param array $values (reference ) to hold the values * @param string $orderBy for order by, default weight * @param int $isActive is_active, default false * * @return array $values * * @access public * @static */ static function getValues($fieldId, &$values, $orderBy = 'weight', $isActive = FALSE) { $fieldValueDAO = new CRM_Price_DAO_FieldValue(); $fieldValueDAO->price_field_id = $fieldId; $fieldValueDAO->orderBy($orderBy, 'label'); if ($isActive) { $fieldValueDAO->is_active = 1; } $fieldValueDAO->find(); while ($fieldValueDAO->fetch()) { CRM_Core_DAO::storeValues($fieldValueDAO, $values[$fieldValueDAO->id]); } return $values; }