function RedirectDestination::set

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Routing/RedirectDestination.php \Drupal\Core\Routing\RedirectDestination::set()
  2. 10 core/lib/Drupal/Core/Routing/RedirectDestination.php \Drupal\Core\Routing\RedirectDestination::set()
  3. 11.x core/lib/Drupal/Core/Routing/RedirectDestination.php \Drupal\Core\Routing\RedirectDestination::set()

Sets the destination as URL.

This method should be used really rarely, for example views uses it, in order to override all destination calls in all of its rendering.

Parameters

string $new_destination: The new destination.

Return value

$this

Overrides RedirectDestinationInterface::set

File

core/lib/Drupal/Core/Routing/RedirectDestination.php, line 77

Class

RedirectDestination
Provides helpers for redirect destinations.

Namespace

Drupal\Core\Routing

Code

public function set($new_destination) {
    $this->destination = $new_destination;
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.