Merge pull request #10532 from monishdeb/CRM-20488_soft_credit_organization
[civicrm-core.git] / CRM / Core / OptionGroup.php
index cff3d392648f8d87e887b5b8f9e39162dbf323ca..89c8eb13d97ae630122f725bb287e2cf6ae889a5 100644 (file)
@@ -262,9 +262,9 @@ WHERE  v.option_group_id = g.id
   }
 
   /**
-   * Lookup titles OR ids for a set of option_value populated fields. The retrieved value
-   * is assigned a new fieldname by id or id's by title
-   * (each within a specificied option_group)
+   * Lookup titles OR ids for a set of option_value populated fields. The
+   * retrieved value is assigned a new field name by id or id's by title
+   * (each within a specified option_group).
    *
    * @param array $params
    *   Reference array of values submitted by the form. Based on.
@@ -274,11 +274,10 @@ WHERE  v.option_group_id = g.id
    *   If $flip = true, adds actual field name => id
    *
    * @param array $names
-   *   Reference array of fieldnames we want transformed.
+   *   Array of field names we want transformed.
    *   Array key = 'postName' (field name submitted by form in $params).
    *   Array value = array('newName' => $newName, 'groupName' => $groupName).
    *
-   *
    * @param bool $flip
    */
   public static function lookupValues(&$params, $names, $flip = FALSE) {
@@ -343,6 +342,7 @@ WHERE  v.option_group_id = g.id
    * @return null
    */
   public static function getLabel($groupName, $value, $onlyActiveValue = TRUE) {
+    Civi::log()->warning('Deprecated function, use CRM_Core_PseudoConstant::getLabel', array('civi.tag' => 'deprecated'));
     if (empty($groupName) ||
       empty($value)
     ) {
@@ -396,6 +396,8 @@ WHERE  v.option_group_id = g.id
       return NULL;
     }
 
+    Civi::log()->warning('Deprecated function, use CRM_Core_PseudoConstant::getKey', array('civi.tag' => 'deprecated'));
+
     $query = "
 SELECT  v.label as label ,v.{$valueField} as value
 FROM   civicrm_option_value v,