hook_file_validate

hook_file_validate(Drupal\file\FileInterface $file) Check that files meet a given criteria. This hook lets modules perform additional validation on files. They're able to report a failure by returning one or more error messages. Parameters \Drupal\file\FileInterface $file: The file entity being validated. Return value array An array of error messages. If there are no problems with the file return an empty array. See also file_validate() Related topics Hooks Define functions that alter the be

ResponsiveImageStyleInterface::getImageStyleMapping

public ResponsiveImageStyleInterface::getImageStyleMapping($breakpoint_id, $multiplier) Gets the image style mapping for a breakpoint ID and multiplier. Parameters string $breakpoint_id: The breakpoint ID. string $multiplier: The multiplier. Return value array|null The image style mapping. NULL if the mapping does not exist. The image style mapping has following keys: image_mapping_type: Either 'image_style' or 'sizes'. image_mapping: If image_mapping_type is 'image_style', the image style I

FileViewsData

Provides views data for the file entity type. Hierarchy class \Drupal\views\EntityViewsData implements EntityHandlerInterface, EntityViewsDataInterface uses StringTranslationTraitclass \Drupal\file\FileViewsData File core/modules/file/src/FileViewsData.php, line 10 Namespace Drupal\file Members Name Modifiers Type Description EntityViewsData::$entityManager protected property The entity manager. EntityViewsData::$entityType protected property Entity type for thi

UserAuthenticationController::getLoginFloodIdentifier

protected UserAuthenticationController::getLoginFloodIdentifier(Request $request, $username) Gets the login identifier for user login flood control. Parameters \Symfony\Component\HttpFoundation\Request $request: The current request. string $username: The username supplied in login credentials. Return value string The login identifier or if the user does not exist an empty string. File core/modules/user/src/Controller/UserAuthenticationController.php, line 325 Class UserAuthenticationContr

QueryFactory::CONFIG_LOOKUP_PREFIX

The prefix for the key value collection for fast lookups. File core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php, line 26 Class QueryFactory Provides a factory for creating entity query objects for the config backend. Namespace Drupal\Core\Config\Entity\Query Code const CONFIG_LOOKUP_PREFIX = 'config.entity.key_store.';

InstallStorage::getComponentFolder

protected InstallStorage::getComponentFolder(Extension $extension) Get folder inside each component that contains the files. Parameters \Drupal\Core\Extension\Extension $extension: The Extension object for the component. Return value string The configuration folder name for this component. File core/lib/Drupal/Core/Config/InstallStorage.php, line 246 Class InstallStorage Storage used by the Drupal installer. Namespace Drupal\Core\Config Code protected function getComponentFolder(Exte

ThemeRegistry::has

public ThemeRegistry::has($key) Returns whether data exists for this key. Parameters string $key: Key that identifies the data. Overrides CacheCollector::has File core/lib/Drupal/Core/Utility/ThemeRegistry.php, line 94 Class ThemeRegistry Builds the run-time theme registry. Namespace Drupal\Core\Utility Code public function has($key) { // Since the theme registry allows for theme hooks to be requested that // are not registered, just check the existence of the key in the registry.

MenuTreeStorage::loadSubtreeData

public MenuTreeStorage::loadSubtreeData($id, $max_relative_depth = NULL) Loads a subtree rooted by the given ID. The returned links are structured like those from loadTreeData(). Parameters string $id: The menu link plugin ID. int $max_relative_depth: (optional) The maximum depth of child menu links relative to the passed in. Defaults to NULL, in which case the full subtree will be returned. Return value array An array with 2 elements: subtree: A fully built menu tree element or FALSE. rout

ModerationStateTransition::$stateTo

ID of to state. Type: string File core/modules/content_moderation/src/Entity/ModerationStateTransition.php, line 69 Class ModerationStateTransition Defines the Moderation state transition entity. Namespace Drupal\content_moderation\Entity Code protected $stateTo;

FieldStorageDefinitionListener::$entityLastInstalledSchemaRepository

The entity definition manager. Type: \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface File core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php, line 36 Class FieldStorageDefinitionListener Reacts to field storage definition CRUD on behalf of the Entity system. Namespace Drupal\Core\Field Code protected $entityLastInstalledSchemaRepository;