StatusMessages::getInfo

public StatusMessages::getInfo() Generate the placeholder in a #pre_render callback, because the hash salt needs to be accessed, which may not yet be available when this is called. Overrides ElementInterface::getInfo File core/lib/Drupal/Core/Render/Element/StatusMessages.php, line 27 Class StatusMessages Provides a messages element. Namespace Drupal\Core\Render\Element Code public function getInfo() { return [ // May have a value of 'status' or 'error' when only displaying mess

StatusMessages::renderMessages

public static StatusMessages::renderMessages($type) #lazy_builder callback; replaces placeholder with messages. Parameters string|null $type: Limit the messages returned by type. Defaults to NULL, meaning all types. Passed on to drupal_get_messages(). These values are supported: NULL 'status' 'warning' 'error' Return value array A renderable array containing the messages. See also drupal_get_messages() File core/lib/Drupal/Core/Render/Element/StatusMessages.php, line 75 Class StatusMes

StatusMessages::generatePlaceholder

public static StatusMessages::generatePlaceholder(array $element) #pre_render callback to generate a placeholder. Parameters array $element: A renderable array. Return value array The updated renderable array containing the placeholder. File core/lib/Drupal/Core/Render/Element/StatusMessages.php, line 47 Class StatusMessages Provides a messages element. Namespace Drupal\Core\Render\Element Code public static function generatePlaceholder(array $element) { $element = [ '#lazy_bui

StatusMessages

Provides a messages element. Used to display results of drupal_set_message() calls. Usage example: $build['status_messages'] = [ '#type' => 'status_messages', ]; Plugin annotation @RenderElement("status_messages") Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterfaceclass \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Render\Element\RenderElement implements Elemen

statistics_ranking

statistics_ranking() Implements hook_ranking(). File core/modules/statistics/statistics.module, line 162 Logs and displays content statistics for a site. Code function statistics_ranking() { if (\Drupal::config('statistics.settings')->get('count_content_views')) { return array( 'views' => array( 'title' => t('Number of views'), 'join' => array( 'type' => 'LEFT', 'table' => 'node_counter', 'alias' => 'node_counter',

statistics_preprocess_block

statistics_preprocess_block(&$variables) Implements hook_preprocess_HOOK() for block templates. File core/modules/statistics/statistics.module, line 189 Logs and displays content statistics for a site. Code function statistics_preprocess_block(&$variables) { if ($variables['configuration']['provider'] == 'statistics') { $variables['attributes']['role'] = 'navigation'; } }

statistics_title_list

statistics_title_list($dbfield, $dbrows) Returns the most viewed content of all time, today, or the last-viewed node. Parameters string $dbfield: The database field to use, one of: 'totalcount': Integer that shows the top viewed content of all time. 'daycount': Integer that shows the top viewed content for today. 'timestamp': Integer that shows only the last viewed node. int $dbrows: The number of rows to be returned. Return value SelectQuery|false A query result containing the node ID,

statistics_token_info

statistics_token_info() Implements hook_token_info(). File core/modules/statistics/statistics.tokens.inc, line 13 Builds placeholder replacement tokens for node visitor statistics. Code function statistics_token_info() { $node['total-count'] = array( 'name' => t("Number of views"), 'description' => t("The number of visitors who have read the node."), ); $node['day-count'] = array( 'name' => t("Views today"), 'description' => t("The number of visitors who have

statistics_tokens

statistics_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) Implements hook_tokens(). File core/modules/statistics/statistics.tokens.inc, line 36 Builds placeholder replacement tokens for node visitor statistics. Code function statistics_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) { $token_service = \Drupal::token(); $replacements = array(); if ($type == 'node' & !empty($data['node'])) {

status-report.html.twig

Default theme implementation for the status report. Available variables: requirements: Contains multiple requirement instances. Each requirement contains: title: The title of the requirement. value: (optional) The requirement's status. description: (optional) The requirement's description. severity_title: The title of the severity. severity_status: Indicates the severity status. See also template_preprocess_status_report() File core/modules/system/templates/status-report.html.twig