You are here

private function EditViewsCustomTable::buildCancelLinkUrl in Views Custom Table 8

Same name and namespace in other branches
  1. 9.0.x src/Form/EditViewsCustomTable.php \Drupal\view_custom_table\Form\EditViewsCustomTable::buildCancelLinkUrl()

Builds the cancel link url for the form.

Return value

Drupal\Core\Url Cancel url

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

File

src/Form/EditViewsCustomTable.php, line 148

Class

EditViewsCustomTable
Edit views custom table form.

Namespace

Drupal\view_custom_table\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('view_custom_table.customtable');
  }
  return $url;
}