Merge pull request #13930 from eileenmcnaughton/recur_cancel_reason
[civicrm-core.git] / CRM / Utils / Recent.php
index cdacc30bf5b3e16f45ecae11b4c937c1ecb8dc46..88c8946f839e929b31d6bc695b1e90b6009f22ce 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018                                |
+ | Copyright CiviCRM LLC (c) 2004-2019                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -27,7 +27,7 @@
 
 /**
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
  */
 
 /**
@@ -174,6 +174,7 @@ class CRM_Utils_Recent {
       }
     }
 
+    CRM_Utils_Hook::recent(self::$_recent);
     $session = CRM_Core_Session::singleton();
     $session->set(self::STORE_NAME, self::$_recent);
   }
@@ -200,15 +201,17 @@ class CRM_Utils_Recent {
       self::$_recent[] = $tempRecent[$i];
     }
 
+    CRM_Utils_Hook::recent(self::$_recent);
     $session = CRM_Core_Session::singleton();
     $session->set(self::STORE_NAME, self::$_recent);
   }
 
   /**
    * Check if a provider is allowed to add stuff.
-   * If correspondig setting is empty, all are allowed
+   * If corresponding setting is empty, all are allowed
    *
    * @param string $providerName
+   * @return bool
    */
   public static function isProviderEnabled($providerName) {
 
@@ -230,6 +233,8 @@ class CRM_Utils_Recent {
 
   /**
    * Gets the list of available providers to civi's recent items stack
+   *
+   * @return array
    */
   public static function getProviders() {
     $providers = array(