public function AutoExpireFlashBag::peek

Gets flash message for a given type.

Parameters

string $type Message category type.:

array $default Default value if $type doee not exist.:

Return value

string

Overrides FlashBagInterface::peek

File

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

Class

AutoExpireFlashBag
AutoExpireFlashBag flash message container.

Namespace

Symfony\Component\HttpFoundation\Session\Flash

Code

public function peek($type, array $default = array()) {
  return $this
    ->has($type) ? $this->flashes['display'][$type] : $default;
}