You are here

class JsRedirectResponse in JS Callback Handler 8.3

JsRedirectResponse.

Hierarchy

  • class \Drupal\js\JsRedirectResponse extends \Symfony\Component\HttpFoundation\RedirectResponse

Expanded class hierarchy of JsRedirectResponse

File

src/JsRedirectResponse.php, line 10

Namespace

Drupal\js
View source
class JsRedirectResponse extends RedirectResponse {

  /**
   * Flag indicating whether redirection should be forced in the browser.
   *
   * @var bool
   */
  protected $force = FALSE;

  /**
   * Sets the whether or not redirection should be forced in the browser.
   *
   * @param bool $force
   *   TRUE or FALSE
   *
   * @return $this
   */
  public function setForce($force = TRUE) {
    $this->force = !!$force;
    return $this;
  }

  /**
   * Indicates whether or not redirection is forced in the browser.
   *
   * @return bool
   *   TRUE or FALSE
   */
  public function isForced() {
    return $this->force;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
JsRedirectResponse::$force protected property Flag indicating whether redirection should be forced in the browser.
JsRedirectResponse::isForced public function Indicates whether or not redirection is forced in the browser.
JsRedirectResponse::setForce public function Sets the whether or not redirection should be forced in the browser.