BookUninstallValidator::hasBookOutlines

protected BookUninstallValidator::hasBookOutlines() Checks if there are any books in an outline. Return value bool TRUE if there are books, FALSE if not. File core/modules/book/src/BookUninstallValidator.php, line 74 Class BookUninstallValidator Prevents book module from being uninstalled whilst any book nodes exist or there are any book outline stored. Namespace Drupal\book Code protected function hasBookOutlines() { return $this->bookOutlineStorage->hasBooks(); }

EntityTypeRepositoryInterface::getEntityTypeFromClass

public EntityTypeRepositoryInterface::getEntityTypeFromClass($class_name) Gets the entity type ID based on the class that is called on. Compares the class this is called on against the known entity classes and returns the entity type ID of a direct match or a subclass as fallback, to support entity type definitions that were altered. Parameters string $class_name: Class name to use for searching the entity type ID. Return value string The entity type ID. Throws \Drupal\Core\Entity\Exception\

EntityTypeInfo::addModerationToEntity

protected EntityTypeInfo::addModerationToEntity(ContentEntityTypeInterface $type) Modifies an entity definition to include moderation support. This primarily just means an extra handler. A Generic one is provided, but individual entity types can provide their own as appropriate. Parameters \Drupal\Core\Entity\ContentEntityTypeInterface $type: The content entity definition to modify. Return value \Drupal\Core\Entity\ContentEntityTypeInterface The modified content entity definition. File core/m

CheckProviderInterface::loadCheck

public CheckProviderInterface::loadCheck($service_id) Lazy-loads access check services. Parameters string $service_id: The service id of the access check service to load. Return value callable A callable access check. Throws \InvalidArgumentException Thrown when the service hasn't been registered in addCheckService(). \Drupal\Core\Access\AccessException Thrown when the service doesn't implement the required interface. File core/lib/Drupal/Core/Access/CheckProviderInterface.php, line 56 Cl

Taxonomy indexing

Functions to maintain taxonomy indexing. Taxonomy uses default field storage to store canonical relationships between terms and fieldable entities. However its most common use case requires listing all content associated with a term or group of terms sorted by creation date. To avoid slow queries due to joining across multiple node and field tables with various conditions and order by criteria, we maintain a denormalized table with all relationships between terms, published nodes and common sor

ToolbarController::checkSubTreeAccess

public ToolbarController::checkSubTreeAccess($hash) Checks access for the subtree controller. Parameters string $hash: The hash of the toolbar subtrees. Return value \Drupal\Core\Access\AccessResultInterface The access result. File core/modules/toolbar/src/Controller/ToolbarController.php, line 50 Class ToolbarController Defines a controller for the toolbar module. Namespace Drupal\toolbar\Controller Code public function checkSubTreeAccess($hash) { $expected_hash = _toolbar_get_sub

AttachedAssetsInterface::setSettings

public AttachedAssetsInterface::setSettings(array $settings) Sets the JavaScript settings that are attached to the current response. Parameters array $settings: The needed JavaScript settings. Return value $this File core/lib/Drupal/Core/Asset/AttachedAssetsInterface.php, line 55 Class AttachedAssetsInterface The attached assets collection for the current response. Namespace Drupal\Core\Asset Code public function setSettings(array $settings);

statistics_title_list

statistics_title_list($dbfield, $dbrows) Returns the most viewed content of all time, today, or the last-viewed node. Parameters string $dbfield: The database field to use, one of: 'totalcount': Integer that shows the top viewed content of all time. 'daycount': Integer that shows the top viewed content for today. 'timestamp': Integer that shows only the last viewed node. int $dbrows: The number of rows to be returned. Return value SelectQuery|false A query result containing the node ID,

DefaultExceptionSubscriber::on429

public DefaultExceptionSubscriber::on429(GetResponseForExceptionEvent $event) Handles a 429 error for HTTP. Parameters \Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event: The event to process. File core/modules/serialization/src/EventSubscriber/DefaultExceptionSubscriber.php, line 124 Class DefaultExceptionSubscriber Handles default error responses in serialization formats. Namespace Drupal\serialization\EventSubscriber Code public function on429(GetResponseForExc

SelectExtender::havingIsNull

public SelectExtender::havingIsNull($field) Sets a condition in the HAVING clause that the specified field be NULL. Parameters $field: The name of the field to check. Return value $this Overrides SelectInterface::havingIsNull File core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 184 Class SelectExtender The base extender class for Select queries. Namespace Drupal\Core\Database\Query Code public function havingIsNull($field) { $this->query->havingIsNull($field);