Skip to main content
Formatting cleanup
Source Link
berliner
  • 2.9k
  • 1
  • 21
  • 29

Redirect:

use Drupal\Core\Url;  
use Symfony\Component\HttpFoundation\RedirectResponse;

$url = Url::fromUri('internal:/');  
$response = new RedirectResponse($url->toString());  
$response->send();

MessegesMessages using static service:

\Drupal::messenger()->addStatus($message);

Other equivalents:

addMessage()
addError()
addWarning()

References:

RedirectResponse
Url
Drupal::messenger
MessengerInterface

Redirect:

use Drupal\Core\Url;  
use Symfony\Component\HttpFoundation\RedirectResponse;

$url = Url::fromUri('internal:/');  
$response = new RedirectResponse($url->toString());  
$response->send();

Messeges using static service:

\Drupal::messenger()->addStatus($message);

Other equivalents:

addMessage()
addError()
addWarning()

References:

RedirectResponse
Url
Drupal::messenger
MessengerInterface

Redirect:

use Drupal\Core\Url;  
use Symfony\Component\HttpFoundation\RedirectResponse;

$url = Url::fromUri('internal:/');  
$response = new RedirectResponse($url->toString());  
$response->send();

Messages using static service:

\Drupal::messenger()->addStatus($message);

Other equivalents:

addMessage()
addError()
addWarning()

References:

RedirectResponse
Url
Drupal::messenger
MessengerInterface

Redirect:

use Drupal\Core\Url;  
use Symfony\Component\HttpFoundation\RedirectResponse;

$url = Url::fromUri('internal:/');  
$response = new RedirectResponse($url->toString());  
$response->send();

// Drupal\Core\Url; // Symfony\Component\HttpFoundation\RedirectResponse; $url = Url::fromUri('internal:/'); $response = new RedirectResponse($url->toString()); $response->send(); Messeges using static service:


**Messeges using static service:**

\Drupal::messenger()->addStatus($message);


**Other equivalents:**

Other equivalents:

addMessage(),  
addError(),  
addWarning().


**References:**

References:

RedirectResponse

  
Url

  
Drupal::messenger

  
MessengerInterface

Redirect:

// Drupal\Core\Url; // Symfony\Component\HttpFoundation\RedirectResponse; $url = Url::fromUri('internal:/'); $response = new RedirectResponse($url->toString()); $response->send();


**Messeges using static service:**

\Drupal::messenger()->addStatus($message);


**Other equivalents:**

addMessage(), addError(), addWarning().


**References:**

RedirectResponse

 Url

 Drupal::messenger

 MessengerInterface

Redirect:

use Drupal\Core\Url;  
use Symfony\Component\HttpFoundation\RedirectResponse;

$url = Url::fromUri('internal:/');  
$response = new RedirectResponse($url->toString());  
$response->send();

Messeges using static service:

\Drupal::messenger()->addStatus($message);

Other equivalents:

addMessage() 
addError() 
addWarning()

References:

RedirectResponse 
Url 
Drupal::messenger 
MessengerInterface

Added a reference.
Source Link

Redirect:

// Drupal\Core\Url; // Symfony\Component\HttpFoundation\RedirectResponse; $url = Url::fromUri('internal:/'); $response = new RedirectResponse($url->toString()); $response->send();


**Messeges using static service:**

\Drupal::messenger()->addStatus($message);


**Other equivalents:**

addMessage(), addError(), addWarning().


**References:**

RedirectResponse

Url

Drupal::messenger

MessengerInterface

Redirect:

// Symfony\Component\HttpFoundation\RedirectResponse; $response = new RedirectResponse($url); $response->send();


**Messeges using static service:**

\Drupal::messenger()->addStatus($message);


**Other equivalents:**

addMessage(), addError(), addWarning().


**References:**

RedirectResponse

Drupal::messenger

MessengerInterface

Redirect:

// Drupal\Core\Url; // Symfony\Component\HttpFoundation\RedirectResponse; $url = Url::fromUri('internal:/'); $response = new RedirectResponse($url->toString()); $response->send();


**Messeges using static service:**

\Drupal::messenger()->addStatus($message);


**Other equivalents:**

addMessage(), addError(), addWarning().


**References:**

RedirectResponse

Url

Drupal::messenger

MessengerInterface

Source Link
Loading