public function Session::getFlashes

Return value

array

Deprecated

since 2.1, will be removed from 2.3

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Session.php, line 260

Class

Session
Session.

Namespace

Symfony\Component\HttpFoundation\Session

Code

public function getFlashes() {
  $all = $this
    ->getBag($this->flashName)
    ->all();
  $return = array();
  if ($all) {
    foreach ($all as $name => $array) {
      if (is_numeric(key($array))) {
        $return[$name] = reset($array);
      }
      else {
        $return[$name] = $array;
      }
    }
  }
  return $return;
}