CRM_Utils_Check - Allow extensions to define their own checks.
authorTim Otten <totten@civicrm.org>
Sat, 7 Mar 2015 00:27:52 +0000 (16:27 -0800)
committerEileen McNaughton <eileen@fuzion.co.nz>
Thu, 28 May 2015 01:46:57 +0000 (13:46 +1200)
CRM/Utils/Check.php
CRM/Utils/Hook.php

index 4f3cd176c0d7e05fee8d0652a82a076957032a6f..3e59c4f6c19a62d9658ed178991d5ab540743922 100644 (file)
@@ -137,6 +137,9 @@ class CRM_Utils_Check {
     foreach ($checks as $check) {
       $messages = array_merge($messages, $check->checkAll());
     }
+
+    CRM_Utils_Hook::check($messages);
+
     return $messages;
   }
 
index 7da33cda192c3975a42ed0bb43a0adc3c4e36b9b..55f50e5ac144a9331862735e6daaefed602e9126 100644 (file)
@@ -1927,4 +1927,16 @@ abstract class CRM_Utils_Hook {
     );
   }
 
+  /**
+   * Check system status.
+   *
+   * @param array $messages
+   *   Array<CRM_Utils_Check_Message>. A list of messages regarding system status.
+   * @return mixed
+   */
+  public static function check(&$messages) {
+    return self::singleton()
+      ->invoke(1, $messages, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_check');
+  }
+
 }