public function CarouselService::renderLink in bootstrap simple carousel 8
Return a Render Link.
Parameters
string $url: The url for the render link.
string $title: The title for the render link.
array $attributes: The array of attributes.
Return value
string Rendered link
Throws
\Exception
File
- src/
Service/ CarouselService.php, line 96
Class
- CarouselService
- CarouselService Class.
Namespace
Drupal\bootstrap_simple_carousel\ServiceCode
public function renderLink($url, $title, array $attributes = []) {
$linkTheme = [
'#type' => 'link',
'#title' => $title,
'#url' => $url,
'#options' => [
'attributes' => $attributes,
'html' => FALSE,
],
];
$link = $this->renderer
->render($linkTheme);
return $link;
}