Drupal::csrfToken

public static Drupal::csrfToken() Returns the CSRF token manager service. The generated token is based on the session ID of the current user. Normally, anonymous users do not have a session, so the generated token will be different on every page request. To generate a token for users without a session, manually start a session prior to calling this function. Return value \Drupal\Core\Access\CsrfTokenGenerator The CSRF token manager. See also \Drupal\Core\Session\SessionManager::start() File c

QuickEditController::$metadataGenerator

The in-place editing metadata generator. Type: \Drupal\quickedit\MetadataGeneratorInterface File core/modules/quickedit/src/QuickEditController.php, line 37 Class QuickEditController Returns responses for Quick Edit module routes. Namespace Drupal\quickedit Code protected $metadataGenerator;

Editor::calculateDependencies

public Editor::calculateDependencies() Calculates dependencies and stores them in the dependency property. Return value $this Overrides ConfigEntityBase::calculateDependencies See also \Drupal\Core\Config\Entity\ConfigDependencyManager File core/modules/editor/src/Entity/Editor.php, line 100 Class Editor Defines the configured text editor entity. Namespace Drupal\editor\Entity Code public function calculateDependencies() { parent::calculateDependencies(); // Create a dependency o

PageCache::handle

public PageCache::handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) Handles a Request to convert it to a Response. When $catch is true, the implementation must catch all exceptions and do its best to convert them to a Response instance. Parameters Request $request A Request instance: int $type The type of the request: (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST) bool $catch Whether to catch exceptions or not: Return value Response A Resp

CommentType::setDescription

public CommentType::setDescription($description) Sets the description of the comment type. Parameters string $description: The new description. Return value $this Overrides CommentTypeInterface::setDescription File core/modules/comment/src/Entity/CommentType.php, line 84 Class CommentType Defines the comment type entity. Namespace Drupal\comment\Entity Code public function setDescription($description) { $this->description = $description; return $this; }

ConfigEntityStorageInterface::loadOverrideFree

public ConfigEntityStorageInterface::loadOverrideFree($id) Loads one entity in their original form without overrides. Parameters mixed $id: The ID of the entity to load. Return value \Drupal\Core\Entity\EntityInterface|null An entity object. NULL if no matching entity is found. File core/lib/Drupal/Core/Config/Entity/ConfigEntityStorageInterface.php, line 71 Class ConfigEntityStorageInterface Provides an interface for configuration entity storage. Namespace Drupal\Core\Config\Entity

BookUninstallValidator::validate

public BookUninstallValidator::validate($module) Determines the reasons a module can not be uninstalled. Example implementation: public function validate($module) { $entity_types = $this->entityManager->getDefinitions(); $reasons = array(); foreach ($entity_types as $entity_type) { if ($module == $entity_type->getProvider() && $entity_type instanceof ContentEntityTypeInterface && $this->entityManager->getStorage($entity_type->id())->hasData()) {

CommentType::getDescription

public CommentType::getDescription() Returns the comment type description. Return value string The comment-type description. Overrides CommentTypeInterface::getDescription File core/modules/comment/src/Entity/CommentType.php, line 77 Class CommentType Defines the comment type entity. Namespace Drupal\comment\Entity Code public function getDescription() { return $this->description; }

AccountInterface::ANONYMOUS_ROLE

Role ID for anonymous users. File core/lib/Drupal/Core/Session/AccountInterface.php, line 18 Class AccountInterface Defines an account interface which represents the current user. Namespace Drupal\Core\Session Code const ANONYMOUS_ROLE = 'anonymous';

SetSubtreesCommand::render

public SetSubtreesCommand::render() Return an array to be run through json_encode and sent to the client. Overrides CommandInterface::render File core/modules/toolbar/src/Ajax/SetSubtreesCommand.php, line 32 Class SetSubtreesCommand Defines an AJAX command that sets the toolbar subtrees. Namespace Drupal\toolbar\Ajax Code public function render() { return [ 'command' => 'setToolbarSubtrees', 'subtrees' => array_map('strval', $this->subtrees), ]; }