public ContactForm::getRedirectUrl()
Returns the url object for redirect path.
Empty redirect property results a url object of front page.
Return value
\Drupal\core\Url The redirect url object.
Overrides ContactFormInterface::getRedirectUrl
File
- core/modules/contact/src/Entity/ContactForm.php, line 139
Class
- ContactForm
- Defines the contact form entity.
Namespace
Drupal\contact\Entity
Code
public function getRedirectUrl() { if ($this->redirect) { $url = Url::fromUserInput($this->redirect); } else { $url = Url::fromRoute('<front>'); } return $url; }
Please login to continue.