You are here

protected function ReplicationForm::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 ReplicationForm::generateMessageRenderArray()
ReplicationForm::buildForm in src/Entity/Form/ReplicationForm.php
Form constructor.

File

src/Entity/Form/ReplicationForm.php, line 276

Class

ReplicationForm
Form controller for Replication edit forms.

Namespace

Drupal\deploy\Entity\Form

Code

protected function generateMessageRenderArray($type, $message) {
  return [
    '#theme' => 'status_messages',
    '#message_list' => [
      $type => [
        Markup::create($message),
      ],
    ],
  ];
}