You are here

public function Domain::setRedirect in Domain Access 8

Sets a redirect on the current domain.

Parameters

int $code: A valid HTTP redirect code (301 or 302).

Overrides DomainInterface::setRedirect

File

domain/src/Entity/Domain.php, line 491

Class

Domain
Defines the domain entity.

Namespace

Drupal\domain\Entity

Code

public function setRedirect($code = 302) {
  $this->redirect = $code;
}