You are here

public function Redirect::getSourceUrl in Redirect 8

Gets the source base URL.

Return value

string

File

src/Entity/Redirect.php, line 169

Class

Redirect
The redirect entity class.

Namespace

Drupal\redirect\Entity

Code

public function getSourceUrl() {
  return $this
    ->get('redirect_source')
    ->get(0)
    ->getUrl()
    ->toString();
}