You are here

public function ImceFM::getMessages in IMCE 8

Same name and namespace in other branches
  1. 8.2 src/ImceFM.php \Drupal\imce\ImceFM::getMessages()

Returns the status messages.

2 calls to ImceFM::getMessages()
ImceFM::buildPage in src/ImceFM.php
Builds file manager page.
ImceFM::getResponse in src/ImceFM.php
Returns the response data.

File

src/ImceFM.php, line 516

Class

ImceFM
Imce File Manager.

Namespace

Drupal\imce

Code

public function getMessages() {

  // Get drupal messages.
  $messenger = \Drupal::messenger();
  $messages = $messenger
    ->all();
  $messenger
    ->deleteAll();
  foreach ($messages as &$group) {
    foreach ($group as &$message) {
      $message = $message instanceof MarkupInterface ? $message . '' : Html::escape($message);
    }
  }

  // Merge with file manager messages.
  return array_merge_recursive($messages, $this->messages);
}