PhpBackend::prepareItem

protected PhpBackend::prepareItem($cache, $allow_invalid) Prepares a cached item. Checks that items are either permanent or did not expire, and returns data as appropriate. Parameters object $cache: An item loaded from cache_get() or cache_get_multiple(). bool $allow_invalid: If FALSE, the method returns FALSE if the cache item is not valid. Return value mixed The item with data as appropriate or FALSE if there is no valid item to load. File core/lib/Drupal/Core/Cache/PhpBackend.php, line 122

node_tokens

node_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) Implements hook_tokens(). File core/modules/node/node.tokens.inc, line 87 Builds placeholder replacement tokens for node-related data. Code function node_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { $token_service = \Drupal::token(); $url_options = array('absolute' => TRUE); if (isset($options['langcode'])) { $url_options['language']

hook_update_projects_alter

hook_update_projects_alter(&$projects) Alter the list of projects before fetching data and comparing versions. Most modules will never need to implement this hook. It is for advanced interaction with the Update Manager module. The primary use-case for this hook is to add projects to the list; for example, to provide update status data on disabled modules and themes. A contributed module might want to hide projects from the list; for example, if there is a site-specific module that doesn't h

comment_help

comment_help($route_name, RouteMatchInterface $route_match) Implements hook_help(). File core/modules/comment/comment.module, line 58 Enables users to comment on published content. Code function comment_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.comment': $output = '<h3>' . t('About') . '</h3>'; $output .= '<p>' . t('The Comment module allows users to comment on site content, set commenting defaults and perm

comment.html.twig

Default theme implementation for comments. Available variables: author: Comment author. Can be a link or plain text. content: The content-related items for the comment display. Use {{ content }} to print them all, or print a subset such as {{ content.field_example }}. Use the following code to temporarily suppress the printing of a given child element: {{ content|without('field_example') }} created: Formatted date and time for when the comment was created. Preprocess functions can re

Tasks::connect

protected Tasks::connect() Check if we can connect to the database. Overrides Tasks::connect File core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php, line 59 Class Tasks Specifies installation tasks for MySQL and equivalent databases. Namespace Drupal\Core\Database\Driver\mysql\Install Code protected function connect() { try { // This doesn't actually test the connection. db_set_active(); // Now actually do a check. try { Database::getConnection();

PoItem::$_context

The context this translation belongs to. Type: string File core/lib/Drupal/Component/Gettext/PoItem.php, line 25 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code private $_context = '';

_batch_process

_batch_process() Processes sets in a batch. If the batch was marked for progressive execution (default), this executes as many operations in batch sets until an execution time of 1 second has been exceeded. It will continue with the next operation of the same batch set in the next request. Return value array An array containing a completion value (in percent) and a status message. File core/includes/batch.inc, line 209 Batch processing API for processes to run in multiple HTTP requests. Code

TypedDataManager

Manages data type plugins. Hierarchy class \Drupal\Component\Plugin\PluginManagerBase implements PluginManagerInterface uses DiscoveryTraitclass \Drupal\Core\Plugin\DefaultPluginManager implements CachedDiscoveryInterface, PluginManagerInterface, CacheableDependencyInterface uses DiscoveryCachedTrait, UseCacheBackendTraitclass \Drupal\Core\TypedData\TypedDataManager implements TypedDataManagerInterface uses DependencySerializationTrait File core/lib/Drupal/Core/TypedData/TypedDataManager.p

LanguageListBuilder::validateForm

public LanguageListBuilder::validateForm(array &$form, FormStateInterface $form_state) Form validation handler. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Overrides DraggableListBuilder::validateForm File core/modules/language/src/LanguageListBuilder.php, line 134 Class LanguageListBuilder Defines a class to build a listing of language entities. Namespace Drupal\