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