function Registry::getPreprocessForSuggestions

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Theme/Registry.php \Drupal\Core\Theme\Registry::getPreprocessForSuggestions()

Returns discovered preprocess suggestions.

Return value

array<string, string> Preprocess suggestions discovered in themes and modules.

2 calls to Registry::getPreprocessForSuggestions()
Registry::getPrefixGroupedUserFunctions in core/lib/Drupal/Core/Theme/Registry.php
Gets all user functions grouped by the word before the first underscore.
Registry::postProcessExtension in core/lib/Drupal/Core/Theme/Registry.php
Completes the theme registry adding discovered functions and hooks.

File

core/lib/Drupal/Core/Theme/Registry.php, line 1044

Class

Registry
Defines the theme registry service.

Namespace

Drupal\Core\Theme

Code

protected function getPreprocessForSuggestions() : array {
  if ($this->preprocessForSuggestions === NULL) {
    $this->preprocessForSuggestions = $this->keyValueFactory
      ->get('hook_data')
      ->get('preprocess_for_suggestions') ?: [];
  }
  return $this->preprocessForSuggestions;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.