protected function ThemeSuggestions::addSuggestion in Express 8
Adds suggestions based on an array of hooks.
Parameters
string|string[] $hook: A single theme hook suggestion or an array of theme hook suggestions.
4 calls to ThemeSuggestions::addSuggestion()
- ThemeSuggestions::addSuggestionsForEntity in themes/
contrib/ bootstrap/ src/ Plugin/ Alter/ ThemeSuggestions.php - Adds "bundle" and "view mode" suggestions for an entity.
- ThemeSuggestions::alterInput in themes/
contrib/ bootstrap/ src/ Plugin/ Alter/ ThemeSuggestions.php - Dynamic alter method for "input".
- ThemeSuggestions::alterLinksDropbutton in themes/
contrib/ bootstrap/ src/ Plugin/ Alter/ ThemeSuggestions.php - Dynamic alter method for "links__dropbutton".
- ThemeSuggestions::processSuggestions in themes/
contrib/ bootstrap/ src/ Plugin/ Alter/ ThemeSuggestions.php - Processes the necessary theme hook suggestions.
File
- themes/
contrib/ bootstrap/ src/ Plugin/ Alter/ ThemeSuggestions.php, line 151 - Contains \Drupal\bootstrap\Plugin\Alter\ThemeSuggestions.
Class
- ThemeSuggestions
- Implements hook_theme_suggestions_alter().
Namespace
Drupal\bootstrap\Plugin\AlterCode
protected function addSuggestion($hook) {
$hooks = (array) $hook;
foreach ($hooks as $hook) {
$suggestions = $this
->buildSuggestions($hook);
foreach ($suggestions as $suggestion) {
$this->suggestions[] = $suggestion;
}
}
}