You are here

private function ConfigEditor::buildCancelLinkUrl in Devel 8.2

Same name and namespace in other branches
  1. 8.3 src/Form/ConfigEditor.php \Drupal\devel\Form\ConfigEditor::buildCancelLinkUrl()
  2. 8 src/Form/ConfigEditor.php \Drupal\devel\Form\ConfigEditor::buildCancelLinkUrl()
  3. 4.x src/Form/ConfigEditor.php \Drupal\devel\Form\ConfigEditor::buildCancelLinkUrl()

Builds the cancel link url for the form.

Return value

Url Cancel url

1 call to ConfigEditor::buildCancelLinkUrl()
ConfigEditor::buildForm in src/Form/ConfigEditor.php
Form constructor.

File

src/Form/ConfigEditor.php, line 132

Class

ConfigEditor
Edit config variable form.

Namespace

Drupal\devel\Form

Code

private function buildCancelLinkUrl() {
  $query = $this
    ->getRequest()->query;
  if ($query
    ->has('destination')) {
    $options = UrlHelper::parse($query
      ->get('destination'));
    $url = Url::fromUri('internal:/' . $options['path'], $options);
  }
  else {
    $url = Url::fromRoute('devel.configs_list');
  }
  return $url;
}