You are here

public function FlashBag::has in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Session/Flash/FlashBag.php \Symfony\Component\HttpFoundation\Session\Flash\FlashBag::has()

Has flash messages for a given type?

Parameters

string $type:

Return value

bool

Overrides FlashBagInterface::has

2 calls to FlashBag::has()
FlashBag::get in vendor/symfony/http-foundation/Session/Flash/FlashBag.php
Gets and clears flash from the stack.
FlashBag::peek in vendor/symfony/http-foundation/Session/Flash/FlashBag.php
Gets flash messages for a given type.

File

vendor/symfony/http-foundation/Session/Flash/FlashBag.php, line 140

Class

FlashBag
FlashBag flash message container.

Namespace

Symfony\Component\HttpFoundation\Session\Flash

Code

public function has($type) {
  return array_key_exists($type, $this->flashes) && $this->flashes[$type];
}