You are here

public static function SettingsForm::getModuleHookEnabled in Nagios Monitoring 8

Parameters

string $module:

\Drupal\Core\Config\Config|\Drupal\Core\Config\ImmutableConfig $config:

Return value

bool

2 calls to SettingsForm::getModuleHookEnabled()
nagios_invoke_all in ./nagios.module
Custom invoke function checking our config for which modules to include.
SettingsForm::buildForm in src/Form/SettingsForm.php
Form constructor.

File

src/Form/SettingsForm.php, line 22

Class

SettingsForm
Allows admins to configure the Nagios module.

Namespace

Drupal\nagios\Form

Code

public static function getModuleHookEnabled($module, $config) {
  $enabled = $config
    ->get('nagios.enable.' . $module);
  if ($enabled === NULL) {
    return TRUE;
  }
  return (bool) $enabled;
}