12345678910111213141516171819202122232425262728 |
- <?php
- use Drupal\Core\Routing\RouteMatchInterface;
- use Drupal\redis\ClientFactory;
- function redis_help($route_name, RouteMatchInterface $route_match) {
- switch ($route_name) {
- case 'help.page.redis':
- if (ClientFactory::hasClient()) {
- $messages = '<p><strong>' . t("Current connected client uses the <em>@name</em> library.", ['@name' => ClientFactory::getClientName()]) . '</strong></p>';
- }
- else {
- $messages = '<p><strong>' . t('No redis connection configured.') . '</strong></p>';
- }
- return $messages;
- }
- }
|