public function NagiosDynamicSettings::query in Nagios Monitoring 8
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
File
- src/
Plugin/ migrate/ source/ NagiosDynamicSettings.php, line 24
Class
- NagiosDynamicSettings
- Fetches Drupal 7 variables on which module hooks are active from the source database.
Namespace
Drupal\nagios\Plugin\migrate\sourceCode
public function query() {
// Fetch all pattern variables whose value is not a serialized empty string.
$var_names = array_map(function (string $module_name) {
return 'nagios_enable_' . $module_name;
}, array_keys(\Drupal::moduleHandler()
->getModuleList()));
return $this
->select('variable', 'v')
->fields('v', [
'name',
'value',
])
->condition('name', $var_names, 'IN')
->condition('value', 's:0:"";', '<>');
}