Commit dc12ee45 authored by anon's avatar anon

by anon: Added help text

parent 7e80ae23
......@@ -6,8 +6,36 @@
*/
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;
/**
* Implements hook_help().
*/
function linkit_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.linkit':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Linkit module provides an easy interface for internal and external linking with wysiwyg editors by using an autocomplete field.') . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Managing Linkit profiles') . '</dt>';
$output .= '<dd>' . t('You can create and edit Linkit profiles on the <a href=":profiles">Linkit profile page</a>. You can create a Linkit profile by clicking "<a href=":add_profile">Add profile</a>".', [':profiles' => Url::fromRoute('entity.linkit_profile.collection')->toString(), ':add_profile' => Url::fromRoute('entity.linkit_profile.add_form')->toString()]) . '</dd>';
$output .= '</dl>';
return $output;
case 'entity.linkit_profile.collection':
$output = '<p>' . t('Linkit profiles define how Linkit will operate on fields that have Linkit attached.') . '</p>';
$output .= '<p>' . t('The most common way to use Linkit is to enable Linkit on the Drupal Link plugin and associate a Linkit profile to it on a Text format.') . '</p>';
return $output;
case 'linkit.matchers':
$output = '<p>' . t('Matchers defines how different data can be queried and displayed in the autocomplete suggestion list. Multiple matchers of the same type can be used at the same time to granulate the suggestions. The order of the added matchers defines in which order the suggestions will be presented.') . '</p>';
return $output;
}
}
/**
* Implements hook_ckeditor_plugin_info_alter().
*/
......
......@@ -65,7 +65,7 @@ class OverviewForm extends FormBase {
'#type' => 'table',
'#header' => [
[
'data' => $this->t('Matcher'),
'data' => $this->t('Matchers'),
'colspan' => 2,
],
$this->t('Weight'),
......
......@@ -2,12 +2,6 @@
namespace Drupal\Tests\linkit\Kernel;
use Drupal\Core\Menu\MenuTreeParameters;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\menu_link_content\Entity\MenuLinkContent;
use Drupal\KernelTests\KernelTestBase;
use Symfony\Component\Routing\Route;
/**
* Tests the entity matcher deriver.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment