* Array of messages
* @link https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_requirements
*/
- public function checkAll() {
+ public function checkAll($showHushed = false) {
$checks = array();
$checks[] = new CRM_Utils_Check_Security();
$checks[] = new CRM_Utils_Check_Env();
CRM_Utils_Hook::check($messages);
+ //TODO
+ if ($showHushed) {
+ $messages[] = new CRM_Utils_Check_Message('ShowHushed', '<h2>SHOWING HUSHED [NOT]</h2>', 'Show Hushed', \Psr\Log\LogLevel::INFO);
+ }
+
return $messages;
}
*/
function _civicrm_api3_system_check_spec(&$spec) {
// $spec['magicword']['api.required'] = 1;
+ $spec['show_hushed'] = array(
+ 'api.default' => false,
+ 'title' => 'show hushed',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ );
}
/**
*/
function civicrm_api3_system_check($params) {
$returnValues = array();
- foreach (CRM_Utils_Check::singleton()->checkAll() as $message) {
- $returnValues[] = $message->toArray();
+ $messages = CRM_Utils_Check::singleton()->checkAll(CRM_Utils_Array::value('show_hushed', $params));
+ foreach ( $messages as $msg) {
+ $returnValues[] = $msg->toArray();
}
// Spec: civicrm_api3_create_success($values = 1, $params = array(), $entity = NULL, $action = NULL)