Updated RedirectAction so that it makes use of the not found short url options

This commit is contained in:
Alejandro Celaya
2018-11-03 12:10:02 +01:00
parent 358b2b661e
commit 313927827d
6 changed files with 100 additions and 23 deletions

View File

@@ -21,18 +21,18 @@ class NotFoundShortUrlOptions extends AbstractOptions
return $this->enableRedirection;
}
protected function enableRedirection(bool $enableRedirection = true): self
protected function setEnableRedirection(bool $enableRedirection = true): self
{
$this->enableRedirection = $enableRedirection;
return $this;
}
public function getRedirectTo(): ?string
public function getRedirectTo(): string
{
return $this->redirectTo;
return $this->redirectTo ?? '';
}
protected function setRedirectTo(string $redirectTo): self
protected function setRedirectTo(?string $redirectTo): self
{
$this->redirectTo = $redirectTo;
return $this;