MTimeProtectedFastFileStorage::delete

public MTimeProtectedFastFileStorage::delete($name) Deletes PHP code from storage. Parameters string $name: The virtual file name. Can be a relative path. Return value bool TRUE if the delete succeeded, FALSE if it failed. Overrides FileStorage::delete File core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php, line 139 Class MTimeProtectedFastFileStorage Stores PHP code in files with securely hashed names. Namespace Drupal\Component\PhpStorage Code public function d

MTimeProtectedFastFileStorage::$secret

The secret used in the HMAC. Type: string File core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php, line 42 Class MTimeProtectedFastFileStorage Stores PHP code in files with securely hashed names. Namespace Drupal\Component\PhpStorage Code protected $secret;

MTimeProtectedFastFileStorage

Stores PHP code in files with securely hashed names. The goal of this class is to ensure that if a PHP file is replaced with an untrusted one, it does not get loaded. Since mtime granularity is 1 second, we cannot prevent an attack that happens within one second of the initial save(). However, it is very unlikely for an attacker exploiting an upload or file write vulnerability to also know when a legitimate file is being saved, discover its hash, undo its file permissions, and override the file

MoreLink::getInfo

public MoreLink::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides Link::getInfo File core/lib/Drupal/Core/Render/Element/MoreLink.php, line 28 Class MoreLink Provides a link render element for a "more" link, like those used in blocks. Namespace Drupal\Core\Render\E

MoreLink

Provides a link render element for a "more" link, like those used in blocks. Properties: #title: The text of the link to generate (defaults to 'More'). See \Drupal\Core\Render\Element\Link for additional properties. Usage Example: $build['more'] = [ '#type' => 'more_link', '#url' => Url::fromRoute('examples.more_examples') ] Plugin annotation @RenderElement("more_link") Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionI

module_set_weight

module_set_weight($module, $weight) Sets weight of a particular module. The weight of uninstalled modules cannot be changed. Parameters string $module: The name of the module (without the .module extension). int $weight: An integer representing the weight of the module. File core/includes/module.inc, line 178 API for loading and interacting with Drupal modules. Code function module_set_weight($module, $weight) { $extension_config = \Drupal::configFactory()->getEditable('core.extension')

module_load_install

module_load_install($module) Loads a module's installation hooks. Parameters $module: The name of the module (without the .module extension). Return value The name of the module's install file, if successful; FALSE otherwise. File core/includes/module.inc, line 89 API for loading and interacting with Drupal modules. Code function module_load_install($module) { // Make sure the installation API is available include_once __DIR__ . '/install.inc'; return module_load_include('install', $

module_load_include

module_load_include($type, $module, $name = NULL) Loads a module include file. Examples: // Load node.admin.inc from the node module. module_load_include('inc', 'node', 'node.admin'); // Load content_types.inc from the node module. module_load_include('inc', 'node', 'content_types'); Do not use this function to load an install file, use module_load_install() instead. Do not use this function in a global context since it requires Drupal to be fully bootstrapped, use require_once DRUPAL

module_config_sort

module_config_sort($data) Sorts the configured list of enabled modules. The list of enabled modules is expected to be ordered by weight and name. The list is always sorted on write to avoid the overhead on read. Parameters array $data: An array of module configuration data. Return value array An array of module configuration data sorted by weight and name. File core/includes/module.inc, line 216 API for loading and interacting with Drupal modules. Code function module_config_sort($data) {

ModuleUninstallValidatorInterface::validate

public ModuleUninstallValidatorInterface::validate($module) Determines the reasons a module can not be uninstalled. Example implementation: public function validate($module) { $entity_types = $this->entityManager->getDefinitions(); $reasons = array(); foreach ($entity_types as $entity_type) { if ($module == $entity_type->getProvider() && $entity_type instanceof ContentEntityTypeInterface && $this->entityManager->getStorage($entity_type->id())->hasD