protected function ReplicationActionForm::generateMessageRenderArray in Deploy - Content Staging 8
Generate a message render array with the given text.
Parameters
string $type: The type of message: status, warning, or error.
string $message: The message to create with.
Return value
array The render array for a status message.
See also
\Drupal\Core\Render\Element\StatusMessages
1 call to ReplicationActionForm::generateMessageRenderArray()
- ReplicationActionForm::buildForm in src/
Form/ ReplicationActionForm.php - Implements buildForm().
File
- src/
Form/ ReplicationActionForm.php, line 238
Class
- ReplicationActionForm
- ReplicationActionForm class.
Namespace
Drupal\deploy\FormCode
protected function generateMessageRenderArray($type, $message) {
return [
'#theme' => 'status_messages',
'#message_list' => [
$type => [
Markup::create($message),
],
],
];
}