public function BaseExtension::getUrl in Markdown 3.0.x
Retrieves the URL of the plugin, if set.
Return value
\Drupal\Core\Url|null
Overrides MarkdownInstallablePluginInterface::getUrl
File
- src/
Plugin/ Markdown/ Extension/ BaseExtension.php, line 120
Class
- BaseExtension
- Base class for markdown extensions.
Namespace
Drupal\markdown\Plugin\Markdown\ExtensionCode
public function getUrl() {
$url = $this->pluginDefinition['url'] ?? NULL;
if ($url && UrlHelper::isExternal($url)) {
return Url::fromUri($url);
}
return $url ? Url::fromUserInput($url) : NULL;
}