hook_image_style_flush

hook_image_style_flush($style) Respond to image style flushing. This hook enables modules to take effect when a style is being flushed (all images are being deleted from the server and regenerated). Any module-specific caches that contain information related to the style should be cleared using this hook. This hook is called whenever a style is updated, deleted, or any effect associated with the style is update or deleted. Parameters \Drupal\image\ImageStyleInterface $style: The image style ob

file_unmanaged_copy

file_unmanaged_copy($source, $destination = NULL, $replace = FILE_EXISTS_RENAME) Copies a file to a new location without database changes or hook invocation. This is a powerful function that in many ways performs like an advanced version of copy(). Checks if $source and $destination are valid and readable/writable. If file already exists in $destination either the call will error out, replace the file or rename the file based on the $replace parameter. If the $source and $destination are equal,

FormState::setInvalidToken

public FormState::setInvalidToken($invalid_token) Flags the form state as having or not an invalid token. Parameters bool $invalid_token: Whether the form has an invalid token. Return value $this Overrides FormStateInterface::setInvalidToken File core/lib/Drupal/Core/Form/FormState.php, line 1238 Class FormState Stores information about the state of a form. Namespace Drupal\Core\Form Code public function setInvalidToken($invalid_token) { $this->invalidToken = (bool) $invalid_tok

Condition::count

public Condition::count() Implements Countable::count(). Returns the size of this conditional. The size of the conditional is the size of its conditional array minus one, because one element is the conjunction. File core/lib/Drupal/Core/Database/Query/Condition.php, line 59 Class Condition Generic class for a series of conditions in a query. Namespace Drupal\Core\Database\Query Code public function count() { return count($this->conditions) - 1; }

EntityManager::getFieldMap

public EntityManager::getFieldMap() Overrides EntityFieldManagerInterface::getFieldMap Deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. File core/lib/Drupal/Core/Entity/EntityManager.php, line 171 Class EntityManager Provides a wrapper around many other services relating to entities. Namespace Drupal\Core\Entity Code public function getFieldMap() { return $this->container->get('entity_field.manager')->getFieldMap(); }

StaticMenuLinkOverrides::saveOverride

public StaticMenuLinkOverrides::saveOverride($id, array $definition) Saves the override. Parameters string $id: A menu link plugin ID. array $definition: The definition values to override. Supported keys: menu_name parent weight expanded enabled Return value array A list of properties which got saved. Overrides StaticMenuLinkOverridesInterface::saveOverride File core/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php, line 125 Class StaticMenuLinkOverrides Defines an implementation of th

CacheContextsPass::process

public CacheContextsPass::process(ContainerBuilder $container) Implements CompilerPassInterface::process(). Collects the cache contexts into the cache_contexts parameter. Overrides CompilerPassInterface::process File core/lib/Drupal/Core/Cache/Context/CacheContextsPass.php, line 18 Class CacheContextsPass Adds cache_contexts parameter to the container. Namespace Drupal\Core\Cache\Context Code public function process(ContainerBuilder $container) { $cache_contexts = []; foreach (arra

ThemeInstaller::$cssCollectionOptimizer

Type: \Drupal\Core\Asset\AssetCollectionOptimizerInterface File core/lib/Drupal/Core/Extension/ThemeInstaller.php, line 47 Class ThemeInstaller Manages theme installation/uninstallation. Namespace Drupal\Core\Extension Code protected $cssCollectionOptimizer;

template_preprocess_rdf_metadata

template_preprocess_rdf_metadata(&$variables) Prepares variables for RDF metadata templates. Default template: rdf-metadata.html.twig. Sometimes it is useful to export data which is not semantically present in the HTML output. For example, a hierarchy of comments is visible for a human but not for machines because this hierarchy is not present in the DOM tree. We can express it in RDFa via empty <span> tags. These aren't visible and give machines extra information about the content an

FileTransferException

FileTransferException class. Hierarchy class \Drupal\Core\FileTransfer\FileTransferException extends \RuntimeException File core/lib/Drupal/Core/FileTransfer/FileTransferException.php, line 8 Namespace Drupal\Core\FileTransfer Members Name Modifiers Type Description FileTransferException::$arguments public property Arguments to be used in this exception. FileTransferException::__construct function Constructs a FileTransferException object.