function LoggerFilterForm::getMessageTypes in MongoDB 8
Gets all available filter types.
Return value
array An array of message type names.
1 call to LoggerFilterForm::getMessageTypes()
- LoggerFilterForm::getFilters in src/
Form/ LoggerFilterForm.php
File
- src/
Form/ LoggerFilterForm.php, line 118 - Contains \Drupal\mongodb\Form\DblogFilterForm.
Class
- LoggerFilterForm
- Provides the MongoDB logging filter form.
Namespace
Drupal\mongodb\FormCode
function getMessageTypes() {
// As of version 1.0.1, the PHP driver doesn't expose the 'distinct' command.
$collection = $this->logger
->templatesCollection();
$result = $collection->db
->command(array(
'distinct' => $collection
->getName(),
'key' => 'type',
));
return $result['values'];
}