Skip to content
Snippets Groups Projects

Issue #2118743: Twig debug output does not display all suggestions when an array of theme hooks is passed to #theme

Issue #2118743: Twig debug output does not display all suggestions when an array of theme hooks is passed to #theme

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 <?php
2
3 /**
4 * @file
5 * Support module for testing theme suggestions.
6 */
7
8 declare(strict_types=1);
9
10 /**
11 * Implements hook_theme().
12 */
13 function theme_suggestions_base1_test_theme($existing, $type, $theme, $path): array {
  • nicxvan
    nicxvan @nicxvan started a thread on the diff
  • 8 declare(strict_types=1);
    9
    10 /**
    11 * Implements hook_theme().
    12 */
    13 function theme_suggestions_base1_test_theme($existing, $type, $theme, $path): array {
    14 $items['theme_suggestions_base4_test_alternate__from_hook_theme_suggestions_hook_alter'] = [
    15 'variables' => [],
    16 ];
    17 return $items;
    18 }
    19
    20 /**
    21 * Implements hook_theme_suggestions_HOOK().
    22 */
    23 function theme_suggestions_base1_test_theme_suggestions_theme_test_base1(array $variables): array {
  • nicxvan
    nicxvan @nicxvan started a thread on the diff
  • 18 }
    19
    20 /**
    21 * Implements hook_theme_suggestions_HOOK().
    22 */
    23 function theme_suggestions_base1_test_theme_suggestions_theme_test_base1(array $variables): array {
    24 return [
    25 'theme_test_base1__from_hook_theme_suggestions_hook',
    26 'theme_test_base1__from_hook_theme_suggestions_hook_too',
    27 ];
    28 }
    29
    30 /**
    31 * Implements hook_theme_suggestions_HOOK_alter().
    32 */
    33 function theme_suggestions_base1_test_theme_suggestions_theme_test_base1_alter(array &$suggestions, array $variables, $hook): void {
  • nicxvan
    nicxvan @nicxvan started a thread on the diff
  • 1 <?php
    2
    3 /**
    4 * @file
    5 * Support module for testing theme suggestions.
    6 */
    7
    8 declare(strict_types=1);
    9
    10 /**
    11 * Implements hook_theme_suggestions_HOOK_alter().
    12 */
    13 function theme_suggestions_base2_ignored_test_theme_suggestions_theme_test_base1_alter(array &$suggestions, array $variables, $hook): void {
  • Pierre Rudloff added 1 commit

    added 1 commit

    • 26ca8072 - unexpected value is not used

    Compare with previous version

  • Please register or sign in to reply
    Loading