src/Core/State/StateTrait.php
public function getState() {
    if (empty($this->state)) {
      $this->state = \Drupal::service('state');
    }
    return $this->state;
  }
public function getState() {
    if (empty($this->state)) {
      $this->state = \Drupal::service('state');
    }
    return $this->state;
  }
public function getState ( ) { if ( empty ( $ this -> state ) ) { $ this -> state = \ Drupal :: service ( 'state' ) ; } return $ this -> state ; }
Gets the state storage.

@return \Drupal\Core\State\StateInterface
The state storage.
Gets the state storage .