public function InstallablePluginBase::getLink in Markdown 8.2
Retrieves the plugin as a link using its label and URL.
Parameters
string|\Drupal\Component\Render\MarkupInterface $label: Optional. A specific label to use for the link. If not specified, it will default to the label or plugin identifier if present.
array $options: An array of options to pass to the Url object constructor.
bool $fallback: Flag indicating whether to fallback to the original label or plugin identifier if no link could be generated.
Return value
\Drupal\Core\GeneratedLink|mixed|void The link if one was generated or the label if $fallback was provided.
Overrides InstallablePluginInterface::getLink
File
- src/
Plugin/ Markdown/ InstallablePluginBase.php, line 264
Class
- InstallablePluginBase
- Base class for installable plugins.
Namespace
Drupal\markdown\Plugin\MarkdownCode
public function getLink($label = NULL, array $options = [], $fallbackToLabel = TRUE) {
return $this->pluginDefinition
->getLink($label, $options, $fallbackToLabel);
}