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

Breadcrumb

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

function StateInterface::get

Returns the stored value for a given key.

Parameters

string $key: The key of the data to retrieve.

mixed $default: The default value to use if the key is not found.

Return value

mixed The stored value, or NULL if no value exists.

File

core/lib/Drupal/Core/State/StateInterface.php, line 23

Class

StateInterface
Defines the interface for the state system.

Namespace

Drupal\Core\State

Code

public function get($key, $default = NULL);

API Navigation

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