API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Controlle...
Enter a descriptive title (above) relating to abstract class ControllerBase, then describe the problem you have found:
protected $stateService
is documented as @var \Drupal\Core\KeyValueStore\KeyValueStoreInterface
but it is actually @var \Drupal\Core\State\StateInterface
.
Likewise, protected function state()
is documented as @return \Drupal\Core\KeyValueStore\KeyValueStoreInterface
but it actually should be @return \Drupal\Core\State\StateInterface
.
Note the core 'state' service, which is stored in the $stateService
instance variable and returned by the state()
function, is documented in core.services.yml as:
state:
class: Drupal\Core\State\State
arguments: ['@keyvalue', '@cache.bootstrap', '@lock']
tags:
- { name: needs_destruction }
Comment | File | Size | Author |
---|---|---|---|
#2 | 2921734-controller-base-documentation.patch | 871 bytes | TR |
Comments
Comment #2
TR CreditAttribution: TR commentedPatch.
Comment #3
TR CreditAttribution: TR commentedPatch still applies ...
Comment #5
borisson_This is indeed the interface of the class we store in the variable (from ::state()).
Comment #6
alexpottComment #7
alexpottCommitted and pushed 126b594c58 to 8.6.x and 631cda4187 to 8.5.x. Thanks!