Skip to content

Commit

Permalink
VOI-37 Custom patch to default drupal/flag links view mode to full
Browse files Browse the repository at this point in the history
  • Loading branch information
camilocodes committed Feb 19, 2025
1 parent ef57deb commit e7f9caa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
"drupal/core": {
"Core fix 3292934 conflict with drupal/flag": "/build/patches/3292934-deprecated-function-strreplace.patch",
"Core fix 3338057 routing preg_match()": "https://www.drupal.org/files/issues/2024-10-23/3338057-20.patch"
},
"drupal/flag": {
"Custom fix default drupal/flag link view mode to full": "/build/patches/unblib-voi-flag-default-view-mode-full.patch"
}
}
},
Expand Down Expand Up @@ -105,7 +108,7 @@
"drupal/core-recommended": "^10",
"drupal/drush_language": "^1",
"drupal/facets": "^2",
"drupal/flag": "^4.0@beta",
"drupal/flag": "^4",
"drupal/flag_search_api": "^2",
"drupal/fontawesome": "^2",
"drupal/google_analytics": "^4",
Expand Down
13 changes: 13 additions & 0 deletions build/patches/unblib-voi-flag-default-view-mode-full.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/FlagLinkBuilder.php b/src/FlagLinkBuilder.php
index bbbf0f3..c89038a 100644
--- a/src/FlagLinkBuilder.php
+++ b/src/FlagLinkBuilder.php
@@ -47,7 +47,7 @@ class FlagLinkBuilder implements FlagLinkBuilderInterface, TrustedCallbackInterf
/**
* {@inheritdoc}
*/
- public function build($entity_type_id, $entity_id, $flag_id, $view_mode = NULL) {
+ public function build($entity_type_id, $entity_id, $flag_id, $view_mode = 'full') {
$entity = $this->entityTypeManager->getStorage($entity_type_id)->load($entity_id);
$flag = $this->flagService->getFlagById($flag_id);

0 comments on commit e7f9caa

Please sign in to comment.