Returns description about slick optionsets module.
array $slick_optionset_options: Available slick optionsets.
string Description for slick_slider field.
protected function getOptionsetDescription($slick_optionset_options) {
if (empty($slick_optionset_options)) {
return [
$this
->t('There are no Slick optionsets available.'),
];
}
$description = $this
->t('Select none, to show all.');
$enable_link = Url::fromRoute('system.modules_list');
$slick_link = Url::fromRoute('entity.slick.collection');
if ($this->moduleHandler
->moduleExists('slick_ui')) {
if ($slick_link
->access($this->currentUser)) {
$description = $this
->t('Select none, to show all. To have more options, go to the <a href=":link">Slick UI config page</a> and add items there.', [
':link' => $slick_link
->toString(),
]);
}
}
else {
if ($enable_link
->access($this->currentUser)) {
$description = $this
->t('Select none, to show all. Enable the <a href=":link">Slick UI</a> from the module list to create more options.', [
':link' => $enable_link
->toString(),
]);
}
}
return $description;
}