private function ConfigEditor::buildCancelLinkUrl in Devel 8.3
Same name and namespace in other branches
- 8 src/Form/ConfigEditor.php \Drupal\devel\Form\ConfigEditor::buildCancelLinkUrl()
- 8.2 src/Form/ConfigEditor.php \Drupal\devel\Form\ConfigEditor::buildCancelLinkUrl()
- 4.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 140
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;
}