Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AutoExpireFlashBag.php

function AutoExpireFlashBag::get

Overrides FlashBagInterface::get

File

vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php, line 68

Class

AutoExpireFlashBag
AutoExpireFlashBag flash message container.

Namespace

Symfony\Component\HttpFoundation\Session\Flash

Code

public function get(string $type, array $default = []) : array {
    $return = $default;
    if (!$this->has($type)) {
        return $return;
    }
    if (isset($this->flashes['display'][$type])) {
        $return = $this->flashes['display'][$type];
        unset($this->flashes['display'][$type]);
    }
    return $return;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal