Drupal 8 Redirect mit Path / Route

use Symfony\Component\HttpFoundation\RedirectResponse;

 

function myredirect($path) {

$response = new RedirectResponse($path, 302);

$response->send(); return;

}

 

// in Funktion:

return myredirect( \Drupal::url('dwquiz.artikelquiz') ); // Route

return myredirect( 'full-url-path' ); // Alternative

Neuen Kommentar schreiben

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Suche

Neueste Kommentare