Hoppa till huvudinnehåll
Menu

Den här sidan använder cookies. Om du fortsätter använda sidan så accepterar du användandet av cookies. Läs mer om cookies

Jag förstår

Redirect user after logout programmatically

This is how you use the hook_user_logout to implement a redirect in Drupal 8.

For implementing a redirect in Drupal 8, we can do it using the hook_user_logout()

/**
 * Implements hook_user_logout().
 */
function mymoduler_user_logout() {
  // we redirect to an external site
  $response = new RedirectResponse("https://www.google.se");
  $response->send();
  return $response;
}

Remember to include the library:

use \Symfony\Component\HttpFoundation\RedirectResponse;

Vi hjälper dig nå resultat. Kontakta oss Ring direkt på 08-20 90 04.

Cache in Drupal 8: How it worked, and what we wanted to be solved in D8

If you just want your content to be cached before Drupal 8, there were almost no problems, just turn on caching for anonymou…
MDN

Cache in Drupal 8: Introduction

In a series of blog posts we will go through how caching works in Drupal 8, to try to demystify the caching layer in Drupal …
MDN

Updating taxonomy term name in Drupal 8

Here you can read how to use hook update for updating taxonomy terms in Drupal 8.