private function EntityconnectController::returnWithMessage in Entity connect 8.2
Sets a message upon return to help with errors.
Parameters
string $msg: The message to display.
string $status: Message status.
string $cache_id: Cache id of the parent.
Return value
\Symfony\Component\HttpFoundation\RedirectResponse The parent page to go back to.
2 calls to EntityconnectController::returnWithMessage()
- EntityconnectController::add in src/
Controller/ EntityconnectController.php - Add a new connecting entity.
- EntityconnectController::edit in src/
Controller/ EntityconnectController.php - Page callback: Redirect to edit form.
File
- src/
Controller/ EntityconnectController.php, line 370
Class
- EntityconnectController
- Returns responses for Entityconnect module routes.
Namespace
Drupal\entityconnect\ControllerCode
private function returnWithMessage($msg, $status, $cache_id) {
$this->messenger
->addStatus($msg, $status);
return $this
->redirect('entityconnect.return', [
'cache_id' => $cache_id,
'cancel' => TRUE,
]);
}