You are here

public function Generator::ulLinks in Style Guide 8

Same name and namespace in other branches
  1. 2.x src/Generator.php \Drupal\styleguide\Generator::ulLinks()

Generate a links array for theme_links.

Overrides GeneratorInterface::ulLinks

File

src/Generator.php, line 240

Class

Generator
Class Generator.

Namespace

Drupal\styleguide

Code

public function ulLinks() {
  $links = [];
  for ($i = 0; $i <= 10; $i++) {
    $word = $this
      ->words();
    $links[$word] = [
      'title' => $word,
      'url' => Url::fromUserInput($this->currentRequest
        ->getRequestUri()),
      'fragment' => 'ul_links',
    ];
  }
  return $links;
}