Loading choices_autocomplete.module 0 → 100644 +27 −0 Original line number Diff line number Diff line <?php /** * @file * Integrates Choices.js plugin with entity reference autocomplete fields. */ use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; /** * Implements hook_help(). */ function choices_autocomplete_help($route_name, RouteMatchInterface $route_match): string { $build = []; if ($route_name === 'help.page.choices_autocomplete') { $build[] = [ '#markup' => '<h2>' . t('Documentation') . '</h2>', ]; $build[] = [ '#type' => 'link', '#title' => 'https://git.drupalcode.org/project/choices_autocomplete/-/blob/1.x/README.md', '#url' => Url::fromUri('https://git.drupalcode.org/project/choices_autocomplete/-/blob/1.x/README.md'), ]; } return \Drupal::service('renderer')->render($build); } Loading
choices_autocomplete.module 0 → 100644 +27 −0 Original line number Diff line number Diff line <?php /** * @file * Integrates Choices.js plugin with entity reference autocomplete fields. */ use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; /** * Implements hook_help(). */ function choices_autocomplete_help($route_name, RouteMatchInterface $route_match): string { $build = []; if ($route_name === 'help.page.choices_autocomplete') { $build[] = [ '#markup' => '<h2>' . t('Documentation') . '</h2>', ]; $build[] = [ '#type' => 'link', '#title' => 'https://git.drupalcode.org/project/choices_autocomplete/-/blob/1.x/README.md', '#url' => Url::fromUri('https://git.drupalcode.org/project/choices_autocomplete/-/blob/1.x/README.md'), ]; } return \Drupal::service('renderer')->render($build); }