Updated the getUrl method on deletions to not require any passed
params to align with usage in webhooks.
Probably better to have a proper interface but would require a wider
change.
Fixes #3154
/**
* Get a URL for this specific deletion.
*/
- public function getUrl($path): string
+ public function getUrl(string $path = 'restore'): string
{
return url("/settings/recycle-bin/{$this->id}/" . ltrim($path, '/'));
}
/**
* Get the url for this revision.
- *
- * @param null|string $path
- *
- * @return string
*/
- public function getUrl($path = null)
+ public function getUrl(string $path = ''): string
{
- $url = $this->page->getUrl() . '/revisions/' . $this->id;
- if ($path) {
- return $url . '/' . trim($path, '/');
- }
-
- return $url;
+ return $this->page->getUrl('/revisions/' . $this->id . '/' . ltrim($path, '/'));
}
/**