kb-8.x-1.x-dev/kb.module
kb.module
<?php
/**
* @file
* Creates a simple knowledge base
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function kb_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.kb':
$ret = '<h2>' . t('KnowledgeBase') . '</h2>';
$ret .= '<h3>' . t('Todo: Add help') . '</h3>';
$ret .= '<p>' . t('Add help items as we come across them, or add as we finish the module features') . '</p>';
$ret .= '<h3>' . t('"KB Group Context" Views Argument') . '</h3>';
$ret .= '<p>' . t('This module provides a special default contextual filter, which covers entity reference
views in which the group context is present in the URL during creation, but not editing. We do not make any
guarantees that it will provide a group ID outside of its specified use case.') . '</p>';
return $ret;
}
}
/**
* Implements hook_page_attachments().
*/
function kb_page_attachments(array &$page) {
$page['#attached']['library'][] = 'kb/kb-css';
}