You are here

class RedirectEvent in Redirect 403 to User Login 8

Same name and namespace in other branches
  1. 2.x src/Event/RedirectEvent.php \Drupal\r4032login\Event\RedirectEvent

Event that is fired just before the redirection is perform.

Hierarchy

  • class \Drupal\r4032login\Event\RedirectEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of RedirectEvent

1 file declares its use of RedirectEvent
R4032LoginSubscriber.php in src/EventSubscriber/R4032LoginSubscriber.php

File

src/Event/RedirectEvent.php, line 10

Namespace

Drupal\r4032login\Event
View source
class RedirectEvent extends Event {
  const EVENT_NAME = 'r4032login.redirect';

  /**
   * The redirect url.
   *
   * @var string
   */
  private $url;

  /**
   * The redirect options.
   *
   * @var array
   */
  private $options;

  /**
   * Constructs the object.
   *
   * @param string $url
   *   The redirect url.
   * @param array $options
   *   The redirect options.
   */
  public function __construct($url, array $options) {
    $this->url = $url;
    $this->options = $options;
  }

  /**
   * Getter for url property.
   *
   * @return string
   *   The redirection url.
   */
  public function getUrl() {
    return $this->url;
  }

  /**
   * Setter for url property.
   *
   * @param string $url
   *   The url to redirect to.
   */
  public function setUrl($url) {
    $this->url = $url;
  }

  /**
   * Getter for options property.
   *
   * @return array
   *   The url redirection options.
   */
  public function getOptions() {
    return $this->options;
  }

  /**
   * Setter for options property.
   *
   * @param array $options
   *   The url options.
   */
  public function setOptions(array $options) {
    $this->options = $options;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RedirectEvent::$options private property The redirect options.
RedirectEvent::$url private property The redirect url.
RedirectEvent::EVENT_NAME constant
RedirectEvent::getOptions public function Getter for options property.
RedirectEvent::getUrl public function Getter for url property.
RedirectEvent::setOptions public function Setter for options property.
RedirectEvent::setUrl public function Setter for url property.
RedirectEvent::__construct public function Constructs the object.