ControllerBase::currentUser

protected ControllerBase::currentUser() Returns the current user. Return value \Drupal\Core\Session\AccountInterface The current user. File core/lib/Drupal/Core/Controller/ControllerBase.php, line 262 Class ControllerBase Utility base class for thin controllers. Namespace Drupal\Core\Controller Code protected function currentUser() { if (!$this->currentUser) { $this->currentUser = $this->container()->get('current_user'); } return $this->currentUser; }

ControllerBase::create

public static ControllerBase::create(ContainerInterface $container) Instantiates a new instance of this class. This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton. Parameters \Symfony\Component\DependencyInjection\ContainerInterface $container: The service c

ControllerBase::container

private ControllerBase::container() Returns the service container. This method is marked private to prevent sub-classes from retrieving services from the container through it. Instead, \Drupal\Core\DependencyInjection\ContainerInjectionInterface should be used for injecting services. Return value \Symfony\Component\DependencyInjection\ContainerInterface $container The service container. File core/lib/Drupal/Core/Controller/ControllerBase.php, line 293 Class ControllerBase Utility base cla

ControllerBase::config

protected ControllerBase::config($name) Retrieves a configuration object. This is the main entry point to the configuration API. Calling $this->config('book.admin') will return a configuration object in which the book module can store its administrative settings. Parameters string $name: The name of the configuration object to retrieve. The name corresponds to a configuration file. For \Drupal::config('book.admin') , the config object returned will contain the contents of book.admin conf

ControllerBase::cache

protected ControllerBase::cache($bin = 'default') Returns the requested cache bin. Parameters string $bin: (optional) The cache bin for which the cache object should be returned, defaults to 'default'. Return value \Drupal\Core\Cache\CacheBackendInterface The cache object associated with the specified bin. File core/lib/Drupal/Core/Controller/ControllerBase.php, line 172 Class ControllerBase Utility base class for thin controllers. Namespace Drupal\Core\Controller Code protected func

ControllerBase::$stateService

The state service. Type: \Drupal\Core\KeyValueStore\KeyValueStoreInterface File core/lib/Drupal/Core/Controller/ControllerBase.php, line 96 Class ControllerBase Utility base class for thin controllers. Namespace Drupal\Core\Controller Code protected $stateService;

ControllerBase::$moduleHandler

The module handler. Type: \Drupal\Core\Extension\ModuleHandlerInterface File core/lib/Drupal/Core/Controller/ControllerBase.php, line 103 Class ControllerBase Utility base class for thin controllers. Namespace Drupal\Core\Controller Code protected $moduleHandler;

ControllerBase::$languageManager

The language manager. Type: \Drupal\Core\Language\LanguageManagerInterface File core/lib/Drupal/Core/Controller/ControllerBase.php, line 68 Class ControllerBase Utility base class for thin controllers. Namespace Drupal\Core\Controller Code protected $languageManager;

ControllerBase::$keyValue

The key-value storage. Type: \Drupal\Core\KeyValueStore\KeyValueStoreInterface File core/lib/Drupal/Core/Controller/ControllerBase.php, line 82 Class ControllerBase Utility base class for thin controllers. Namespace Drupal\Core\Controller Code protected $keyValue;

ControllerBase::$formBuilder

The form builder. Type: \Drupal\Core\Form\FormBuilderInterface File core/lib/Drupal/Core/Controller/ControllerBase.php, line 110 Class ControllerBase Utility base class for thin controllers. Namespace Drupal\Core\Controller Code protected $formBuilder;