file_move

file_move(FileInterface $source, $destination = NULL, $replace = FILE_EXISTS_RENAME) Moves a file to a new location and update the file's database entry. Checks if $source and $destination are valid and readable/writable. Performs a file move if $source is not equal to $destination. If file already exists in $destination either the call will error out, replace the file or rename the file based on the $replace parameter. Adds the new file to the files database. Parameters \Drupal\file\FileInt

UpdateProcessorInterface::deleteQueueItem

public UpdateProcessorInterface::deleteQueueItem($item) Deletes a finished item from the update fetch queue. Parameters \stdClass $item: The item returned by \Drupal\Core\Queue\QueueInterface::claimItem(). See also \Drupal\Core\Queue\QueueInterface::deleteItem() File core/modules/update/src/UpdateProcessorInterface.php, line 80 Class UpdateProcessorInterface Processor of project update information. Namespace Drupal\update Code public function deleteQueueItem($item);

AccessResultForbidden::setReason

public AccessResultForbidden::setReason($reason) Sets the reason for this access result. Parameters $reason string|null: The reason of this access result or NULL if no reason is provided. Return value \Drupal\Core\Access\AccessResultInterface The access result instance. Overrides AccessResultReasonInterface::setReason File core/lib/Drupal/Core/Access/AccessResultForbidden.php, line 45 Class AccessResultForbidden Value object indicating a forbidden access result, with cacheability metadat

statistics_cron

statistics_cron() Implements hook_cron(). File core/modules/statistics/statistics.module, line 72 Logs and displays content statistics for a site. Code function statistics_cron() { $statistics_timestamp = \Drupal::state()->get('statistics.day_timestamp') ? : 0; if ((REQUEST_TIME - $statistics_timestamp) >= 86400) { // Reset day counts. db_update('node_counter') ->fields(array('daycount' => 0)) ->execute(); \Drupal::state()->set('statistics.day_ti

MenuLinkManager::createInstance

public MenuLinkManager::createInstance($plugin_id, array $configuration = array()) Returns a pre-configured menu link plugin instance. Parameters string $plugin_id: The ID of the plugin being instantiated. array $configuration: An array of configuration relevant to the plugin instance. Return value \Drupal\Core\Menu\MenuLinkInterface A menu link instance. Throws \Drupal\Component\Plugin\Exception\PluginException If the instance cannot be created, such as if the ID is invalid. Overrides Facto

EntityManager::clearDisplayModeInfo

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

statistics_get

statistics_get($nid) Retrieves a node's "view statistics". Parameters int $nid: The node ID. Return value array An associative array containing: totalcount: Integer for the total number of times the node has been viewed. daycount: Integer for the total number of times the node has been viewed "today". For the daycount to be reset, cron must be enabled. timestamp: Integer for the timestamp of when the node was last viewed. File core/modules/statistics/statistics.module, line 141 Logs and

ConfigManager::findConfigEntityDependentsAsEntities

public ConfigManager::findConfigEntityDependentsAsEntities($type, array $names, ConfigDependencyManager $dependency_manager = NULL) Finds config entities that are dependent on extensions or entities. Parameters string $type: The type of dependency being checked. Either 'module', 'theme', 'config' or 'content'. array $names: The specific names to check. If $type equals 'module' or 'theme' then it should be a list of module names or theme names. In the case of 'config' or 'content' it should be

ViewsStyle::$help

A short help string; this is displayed in the views UI. Type: \Drupal\Core\Annotation\Translation Related topics Annotation for translatable text Describes how to put translatable UI text into annotations. File core/modules/views/src/Annotation/ViewsStyle.php, line 48 Class ViewsStyle Defines a Plugin annotation object for views style plugins. Namespace Drupal\views\Annotation Code public $help = '';

FormStateInterface::setInvalidToken

public FormStateInterface::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 File core/lib/Drupal/Core/Form/FormStateInterface.php, line 566 Class FormStateInterface Provides an interface for an object containing the current state of a form. Namespace Drupal\Core\Form Code public function setInvalidToken($invalid_token);