You are here

protected function RedirectSubscriber::getRedirect in Url Redirect 8

Same name and namespace in other branches
  1. 8.2 src/EventSubscriber/RedirectSubscriber.php \Drupal\url_redirect\EventSubscriber\RedirectSubscriber::getRedirect()

Get redirection.

Parameters

string $path: Source path.

Return value

array

1 call to RedirectSubscriber::getRedirect()
RedirectSubscriber::doRedirect in src/EventSubscriber/RedirectSubscriber.php
Set response to redirection.

File

src/EventSubscriber/RedirectSubscriber.php, line 212

Class

RedirectSubscriber

Namespace

Drupal\url_redirect\EventSubscriber

Code

protected function getRedirect($path) {
  $queryResult = $this->queryFactory
    ->get('url_redirect')
    ->condition('path', $path)
    ->condition('status', 1)
    ->execute();
  return $queryResult;
}