private function AddViewsCustomTable::buildCancelLinkUrl in Views Custom Table 8
Same name and namespace in other branches
- 9.0.x src/Form/AddViewsCustomTable.php \Drupal\view_custom_table\Form\AddViewsCustomTable::buildCancelLinkUrl()
Builds the cancel link url for the form.
Return value
Drupal\Core\Url Cancel url
1 call to AddViewsCustomTable::buildCancelLinkUrl()
- AddViewsCustomTable::buildForm in src/
Form/ AddViewsCustomTable.php - Form constructor.
File
- src/
Form/ AddViewsCustomTable.php, line 279
Class
- AddViewsCustomTable
- Add views custom table form.
Namespace
Drupal\view_custom_table\FormCode
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;
}