diff --git a/web/modules/custom/github_feed/github_feed.module b/web/modules/custom/github_feed/github_feed.module index 86b95d8cdb6991188a4d37e747246297e38e83aa..b302dbaa4925557fca2b43550e9fecd53da537dc 100644 --- a/web/modules/custom/github_feed/github_feed.module +++ b/web/modules/custom/github_feed/github_feed.module @@ -15,7 +15,7 @@ function github_feed_theme(array $existing, string $type, string $theme, string 'github_feed' => [ 'variables' => [ 'url' => NULL, - 'type' => NULL, + 'feed_type' => NULL, 'items' => NULL, ], ], @@ -52,7 +52,7 @@ function github_feed_theme(array $existing, string $type, string $theme, string * Implements template_preprocess_HOOK(). */ function template_preprocess_github_feed(array &$variables): void { - switch ($variables['type']) { + switch ($variables['feed_type']) { case 'issue': $variables['type_parsed'] = t('Issues'); $variables['icon_id'] = 'info-circle'; diff --git a/web/modules/custom/github_feed/src/Plugin/Field/FieldFormatter/GitHubFeedDefaultFormatter.php b/web/modules/custom/github_feed/src/Plugin/Field/FieldFormatter/GitHubFeedDefaultFormatter.php index 9aeb6b962f6df6c1a10f3e3818a4a0b29d086d78..1138a5ef043548aa4d2ef5036c46ec5592210e05 100644 --- a/web/modules/custom/github_feed/src/Plugin/Field/FieldFormatter/GitHubFeedDefaultFormatter.php +++ b/web/modules/custom/github_feed/src/Plugin/Field/FieldFormatter/GitHubFeedDefaultFormatter.php @@ -90,7 +90,7 @@ public function viewElements(FieldItemListInterface $items, $langcode): array { $element[$delta] = [ '#theme' => 'github_feed', '#url' => $item->repository, - '#type' => $item->type, + '#feed_type' => $item->type, '#cache' => [ 'max-age' => $this->getFieldSetting('cache_max_age'), ], diff --git a/web/modules/custom/github_feed/templates/github-feed.html.twig b/web/modules/custom/github_feed/templates/github-feed.html.twig index a61e624509f9db860f6a2a639178e04976c9e56a..b762dfe8ede0288fc01103607104ce1bfd5200e2 100644 --- a/web/modules/custom/github_feed/templates/github-feed.html.twig +++ b/web/modules/custom/github_feed/templates/github-feed.html.twig @@ -3,7 +3,7 @@ * Variables: * - items: The feed object. * - url: The url of the feed. - * - type: The type of the feed. + * - feed_type: The type of the feed. #} <div class="github-feed"> <h3>{{ "Items of type"|t }} "{{ type_parsed }}" {{ "from"|t }} {{ url }}:</h3> diff --git a/web/modules/custom/joinup_modal/joinup_modal.module b/web/modules/custom/joinup_modal/joinup_modal.module index 67371fe71708f6b02c82d344a209ff8c3956c227..dc41b07856c16443b7a8548587dd39a78883409d 100644 --- a/web/modules/custom/joinup_modal/joinup_modal.module +++ b/web/modules/custom/joinup_modal/joinup_modal.module @@ -14,7 +14,6 @@ function joinup_modal_theme(): array { return [ 'joinup_modal_anonymous' => [ 'variables' => [ - 'type' => NULL, 'title' => NULL, 'description' => NULL, 'login' => NULL, @@ -23,12 +22,3 @@ function joinup_modal_theme(): array { ], ]; } - -/** - * Implements hook_theme_suggestions_HOOK(). - */ -function joinup_modal_theme_suggestions_joinup_modal_anonymous(array $variables): array { - return [ - 'joinup_modal_anonymous__' . $variables['type'], - ]; -} diff --git a/web/modules/custom/joinup_modal/src/Controller/JoinupModalAnonymousController.php b/web/modules/custom/joinup_modal/src/Controller/JoinupModalAnonymousController.php index 09500e97cb721cdf9580f760121a14a694d1f51f..879ba0e5ad827b2283ff86eaec36c2815a09a5d6 100644 --- a/web/modules/custom/joinup_modal/src/Controller/JoinupModalAnonymousController.php +++ b/web/modules/custom/joinup_modal/src/Controller/JoinupModalAnonymousController.php @@ -30,8 +30,7 @@ public function render(string $type): array { 'query' => $this->getDestinationArray(), ]); return [ - '#theme' => 'joinup_modal_anonymous', - '#type' => $type, + '#theme' => "joinup_modal_anonymous__$type", '#title' => $this->t('You are not signed in'), '#login' => new Link('Sign in', $login), // Replicate logic of "Create an account" from navigation, it points diff --git a/web/themes/ventuno/templates/github_feed/github-feed.html.twig b/web/themes/ventuno/templates/github_feed/github-feed.html.twig index e7d3bf41c62df532b9d5db24c0856173f1f4c43b..1b4fa06e341d1330fd0beb594dcbfdc508260086 100644 --- a/web/themes/ventuno/templates/github_feed/github-feed.html.twig +++ b/web/themes/ventuno/templates/github_feed/github-feed.html.twig @@ -3,7 +3,7 @@ * Variables: * - items: The feed object. * - url: The url of the feed. - * - type: The type of the feed. + * - feed_type: The type of the feed. #} <div class="github-feed mb-4"> <h4 class="mb-3">