hook_uninstall

hook_uninstall() Remove any information that the module sets. The information that the module should remove includes: state that the module has set using \Drupal::state() modifications to existing tables The module should not remove its entry from the module configuration. Database tables defined by hook_schema() will be removed automatically. The uninstall hook must be implemented in the module's .install file. It will fire when the module gets uninstalled but before the module's database ta

ImageFactory::setToolkitId

public ImageFactory::setToolkitId($toolkit_id) Sets the ID of the image toolkit. Parameters string $toolkit_id: The ID of the image toolkit to use for this image factory. Return value $this File core/lib/Drupal/Core/Image/ImageFactory.php, line 45 Class ImageFactory Provides a factory for image objects. Namespace Drupal\Core\Image Code public function setToolkitId($toolkit_id) { $this->toolkitId = $toolkit_id; return $this; }

RoutingEvents

Contains all events thrown in the core routing component. Hierarchy class \Drupal\Core\Routing\RoutingEvents File core/lib/Drupal/Core/Routing/RoutingEvents.php, line 8 Namespace Drupal\Core\Routing Members Name Modifiers Type Description RoutingEvents::ALTER constant Name of the event fired during route collection to allow changes to routes. RoutingEvents::DYNAMIC constant Name of the event fired during route collection to allow new routes. RoutingEvents::FINI

DateFormat::sort

public static DateFormat::sort(ConfigEntityInterface $a, ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label. Overrides ConfigEntityBase::sort File core/lib/Drupal/Core/Datetime/Entity/DateFormat.php, line 87 Class DateFormat Defines the Date Format configuration entity class. Namespace Drupal\Core\Datetime\Entity Code public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) { if ($a->isLocked() == $b->

CommentAccessControlHandler::checkCreateAccess

protected CommentAccessControlHandler::checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) Performs create access checks. This method is supposed to be overwritten by extending classes that do their own custom access checking. Parameters \Drupal\Core\Session\AccountInterface $account: The user for which to check access. array $context: An array of key-value pairs to pass additional context when needed. string|null $entity_bundle: (optional) The bundle of the ent

hook_batch_alter

hook_batch_alter(&$batch) Alter batch information before a batch is processed. Called by batch_process() to allow modules to alter a batch before it is processed. Parameters $batch: The associative array of batch information. See batch_set() for details on what this could contain. See also batch_set() batch_process() Related topics Batch operations Creates and processes batch operations. Hooks Define functions that alter the behavior of Drupal core. File core/lib/Drupal/Core/Form/form.a

ContentEntityDeleteForm::getCancelUrl

public ContentEntityDeleteForm::getCancelUrl() Returns the route to go to if the user cancels the action. Return value \Drupal\Core\Url A URL object. Overrides ConfirmFormInterface::getCancelUrl File core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php, line 81 Class ContentEntityDeleteForm Provides a generic base class for a content entity deletion form. Namespace Drupal\Core\Entity Code public function getCancelUrl() { /** @var \Drupal\Core\Entity\ContentEntityInterface $entity

EntityTypeInterface::getRevisionTable

public EntityTypeInterface::getRevisionTable() Gets the name of the entity's revision table. @todo Used by SqlContentEntityStorage only. Return value string|null The name of the entity type's revision table, or NULL if none exists. File core/lib/Drupal/Core/Entity/EntityTypeInterface.php, line 602 Class EntityTypeInterface Provides an interface for an entity type and its metadata. Namespace Drupal\Core\Entity Code public function getRevisionTable();

TwigPhpStorageCache::write

public TwigPhpStorageCache::write($key, $content) Writes the compiled template to cache. Parameters string $key The cache key: string $content The template representation as a PHP class: Overrides Twig_CacheInterface::write File core/lib/Drupal/Core/Template/TwigPhpStorageCache.php, line 96 Class TwigPhpStorageCache Provides an alternate cache storage for Twig using PhpStorage. Namespace Drupal\Core\Template Code public function write($key, $content) { $this->storage()->save($

RefinableCacheableDependencyTrait::addCacheContexts

public RefinableCacheableDependencyTrait::addCacheContexts(array $cache_contexts) Adds cache contexts. Parameters string[] $cache_contexts: The cache contexts to be added. Return value $this Overrides RefinableCacheableDependencyInterface::addCacheContexts File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 71 Class RefinableCacheableDependencyTrait Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. Namespace Drupal\Core\Cache Code public func