Added reporting server config to reporting module
This commit is contained in:
parent
51db7f00d4
commit
e45d49e299
@ -0,0 +1,16 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- search_api_db
|
||||
id: opencase_reporting_server
|
||||
name: 'OpenCase Reporting'
|
||||
description: ''
|
||||
backend: search_api_db
|
||||
backend_config:
|
||||
database: 'default:default'
|
||||
min_chars: 3
|
||||
partial_matches: false
|
||||
autocomplete:
|
||||
suggest_suffix: true
|
||||
suggest_words: true
|
38
modules/opencase_reporting/opencase_reporting.module
Normal file
38
modules/opencase_reporting/opencase_reporting.module
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains opencase_reporting.module.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function opencase_reporting_help($route_name, RouteMatchInterface $route_match) {
|
||||
switch ($route_name) {
|
||||
// Main module help for the opencase_reporting module.
|
||||
case 'help.page.opencase_reporting':
|
||||
$output = '';
|
||||
$output .= '<h3>' . t('About') . '</h3>';
|
||||
$output .= '<p>' . t('Reporting functionality for OpenCase.') . '</p>';
|
||||
return $output;
|
||||
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_uninstall().
|
||||
* Removes configs.
|
||||
*/
|
||||
function opencase_reporting_uninstall() {
|
||||
$configs = [
|
||||
'search_api.server.opencase_reporting_server',
|
||||
'search_api.index.opencase_reporting_actors'
|
||||
];
|
||||
foreach($configs as $config) {
|
||||
Drupal::configFactory()->getEditable($config)->delete();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user