Renderer::addCacheableDependency

public Renderer::addCacheableDependency(array &$elements, $dependency) Adds a dependency on an object: merges its cacheability metadata. For instance, when a render array depends on some configuration, an entity, or an access result, we must make sure their cacheability metadata is present on the render array. This method makes doing that simple. Parameters array &$elements: The render array to update. \Drupal\Core\Cache\CacheableDependencyInterface|mixed $dependency: The dependency. I

UseCacheBackendTrait::$cacheBackend

Cache backend instance. Type: \Drupal\Core\Cache\CacheBackendInterface File core/lib/Drupal/Core/Cache/UseCacheBackendTrait.php, line 15 Class UseCacheBackendTrait Provides methods to use a cache backend while respecting a 'use caches' flag. Namespace Drupal\Core\Cache Code protected $cacheBackend;

BundleModerationConfigurationForm::__construct

public BundleModerationConfigurationForm::__construct(EntityTypeManagerInterface $entity_type_manager) File core/modules/content_moderation/src/Form/BundleModerationConfigurationForm.php, line 28 Class BundleModerationConfigurationForm Form for configuring moderation usage on a given entity bundle. Namespace Drupal\content_moderation\Form Code public function __construct(EntityTypeManagerInterface $entity_type_manager) { $this->entityTypeManager = $entity_type_manager; }

BundleModerationConfigurationForm::formBuilderCallback

public BundleModerationConfigurationForm::formBuilderCallback($entity_type_id, EntityInterface $bundle, &$form, FormStateInterface $form_state) Form builder callback. @todo This should be folded into the form method. Parameters string $entity_type_id: The entity type identifier. \Drupal\Core\Entity\EntityInterface $bundle: The bundle entity updated with the submitted values. array $form: The complete form array. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the for

hook_entity_operation_alter

hook_entity_operation_alter(array &$operations, \Drupal\Core\Entity\EntityInterface $entity) Alter entity operations. Parameters array $operations: Operations array as returned by \Drupal\Core\Entity\EntityListBuilderInterface::getOperations(). \Drupal\Core\Entity\EntityInterface $entity: The entity on which the linked operations will be performed. Related topics Hooks Define functions that alter the behavior of Drupal core. File core/lib/Drupal/Core/Entity/entity.api.php, line 1840 Hook

BundleModerationConfigurationForm::getBaseFormId

public BundleModerationConfigurationForm::getBaseFormId() Blank out the base form ID so that form alters that use the base form ID to target both add and edit forms don't pick up this form. Overrides EntityForm::getBaseFormId File core/modules/content_moderation/src/Form/BundleModerationConfigurationForm.php, line 45 Class BundleModerationConfigurationForm Form for configuring moderation usage on a given entity bundle. Namespace Drupal\content_moderation\Form Code public function getB

RouteMatchInterface::getRawParameter

public RouteMatchInterface::getRawParameter($parameter_name) Returns the raw value of a named route parameter. Parameters string $parameter_name: The parameter name. Return value string|null The raw (non-upcast) parameter value. NULL if the route doesn't define the parameter or if the raw parameter value can't be determined from the request. See also \Drupal\Core\Routing\RouteMatchInterface::getParameter() File core/lib/Drupal/Core/Routing/RouteMatchInterface.php, line 87 Class RouteMatc

NullStorageExpirable::setWithExpireIfNotExists

public NullStorageExpirable::setWithExpireIfNotExists($key, $value, $expire) Sets a value for a given key with a time to live if it does not yet exist. Parameters string $key: The key of the data to store. mixed $value: The data to store. int $expire: The time to live for items, in seconds. Return value bool TRUE if the data was set, or FALSE if it already existed. Overrides KeyValueStoreExpirableInterface::setWithExpireIfNotExists File core/lib/Drupal/Core/KeyValueStore/NullStorageExpirable.

LanguageConfigFactoryOverride::addCollections

public LanguageConfigFactoryOverride::addCollections(ConfigCollectionInfo $collection_info) Reacts to the ConfigEvents::COLLECTION_INFO event. Parameters \Drupal\Core\Config\ConfigCollectionInfo $collection_info: The configuration collection info event. Overrides ConfigFactoryOverrideBase::addCollections File core/modules/language/src/Config/LanguageConfigFactoryOverride.php, line 169 Class LanguageConfigFactoryOverride Provides language overrides for the configuration factory. Namespac

_tracker_remove

_tracker_remove($nid, $uid = NULL, $changed = NULL) Cleans up indexed data when nodes or comments are removed. Parameters int $nid: The node ID. int $uid: The author of the node or comment. int $changed: The last changed timestamp of the node. File core/modules/tracker/tracker.module, line 313 Tracks recent content posted by a user or users. Code function _tracker_remove($nid, $uid = NULL, $changed = NULL) { $node = Node::load($nid); // The user only keeps their subscription if the node