Drupal 8 8.0.2
Information about the State API.
The basic entry point into the State API is ::state(), which returns an object of class . This class has methods for storing and retrieving state information; each piece of state information is associated with a string-valued key. Example:
For more on the State API, see https://www.drupal.org/developing/api/8/state