function ConfigEditor::buildCancelLinkUrl
Same name in other branches
- 8.x-1.x src/Form/ConfigEditor.php \Drupal\devel\Form\ConfigEditor::buildCancelLinkUrl()
- 5.x src/Form/ConfigEditor.php \Drupal\devel\Form\ConfigEditor::buildCancelLinkUrl()
Builds the cancel link url for the form.
Return value
\Drupal\Core\Url Cancel url
1 call to ConfigEditor::buildCancelLinkUrl()
- ConfigEditor::buildForm in src/
Form/ ConfigEditor.php - Form constructor.
File
-
src/
Form/ ConfigEditor.php, line 141
Class
- ConfigEditor
- Edit config variable form.
Namespace
Drupal\devel\FormCode
private function buildCancelLinkUrl() {
$query = $this->getRequest()->query;
if ($query->has('destination')) {
$options = UrlHelper::parse($query->get('destination'));
$url = Url::fromUserInput('/' . ltrim($options['path'], '/'), $options);
}
else {
$url = Url::fromRoute('devel.configs_list');
}
return $url;
}