예제 #1
0
 /**
  * Flush constant.
  *
  * Wrapper for Pseudoconstant methods. We use this so the calling function
  * doesn't need to know which class the Pseudoconstant is on
  * (some are on the Contribute_Pseudoconsant Class etc
  *
  *
  * @param $constant
  *
  * @return array
  *   array reference of all relevant constant
  */
 public static function flushConstant($constant)
 {
     $class = self::findConstantClass($constant);
     if ($class) {
         $class::flush(lcfirst($constant));
         //@todo the rule is api functions should only be called from within the api - we
         // should move this function to a Core class
         $name = _civicrm_api_get_entity_name_from_camel($constant);
         CRM_Core_OptionGroup::flush($name);
         return TRUE;
     }
 }