Merge pull request #5145 from agh1/case-insensitive-headers
[civicrm-core.git] / CRM / Core / BAO / CustomOption.php
index e91613b812e4b8b2de0037caf87f5d7d27f080a6..7b01478cdb7a7447e42469251b5ee9d11cd1b7e4 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -40,7 +40,7 @@
 class CRM_Core_BAO_CustomOption {
 
   /**
-   * Fetch object based on array of properties
+   * Fetch object based on array of properties.
    *
    * @param array $params
    *   (reference ) an assoc array of name/value pairs.
@@ -48,7 +48,6 @@ class CRM_Core_BAO_CustomOption {
    *   (reference ) an assoc array to hold the flattened values.
    *
    * @return CRM_Core_BAO_CustomOption
-   * @static
    */
   public static function retrieve(&$params, &$defaults) {
     $customOption = new CRM_Core_DAO_OptionValue();
@@ -61,18 +60,17 @@ class CRM_Core_BAO_CustomOption {
   }
 
   /**
-   * Returns all active options ordered by weight for a given field
+   * Returns all active options ordered by weight for a given field.
    *
    * @param int $fieldID
    *   Field whose options are needed.
-   * @param bool $inactiveNeededDo we need inactive options ?.
+   * @param bool $inactiveNeeded Do we need inactive options ?.
    *   Do we need inactive options ?.
    *
    * @return array
    *   all active options for fieldId
-   * @static
    */
-  static function getCustomOption(
+  public static function getCustomOption(
     $fieldID,
     $inactiveNeeded = FALSE
   ) {
@@ -122,7 +120,6 @@ class CRM_Core_BAO_CustomOption {
    *
    * @return string
    *   the label to display for this custom field
-   * @static
    */
   public static function getOptionLabel($fieldId, $value, $htmlType = NULL, $dataType = NULL) {
     if (!$fieldId) {
@@ -156,7 +153,7 @@ WHERE  id = %1
       case 'Autocomplete-Select':
         if (!in_array($dataType, array(
           'Boolean',
-          'ContactReference'
+          'ContactReference',
         ))
         ) {
           $options = self::valuesByID($fieldId);
@@ -171,12 +168,11 @@ WHERE  id = %1
   }
 
   /**
-   * Delete Option
+   * Delete Option.
    *
    * @param $optionId integer
    *   option id
    *
-   * @static
    */
   public static function del($optionId) {
     // get the customFieldID
@@ -311,4 +307,5 @@ SET    {$dao->columnName} = REPLACE( {$dao->columnName}, %1, %2 )";
 
     return $options;
   }
+
 }