W3cubDocs

/Drupal 8

public function RedirectDestination::set

public RedirectDestination::set($new_destination)

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Routing!RedirectDestination.php/function/RedirectDestination::set/8.1.x