Skip to content
This repository has been archived by the owner on Feb 23, 2020. It is now read-only.

Error on Access Rules Event page. #191

Open
uttkarsh-26 opened this issue Mar 26, 2019 · 3 comments
Open

Error on Access Rules Event page. #191

uttkarsh-26 opened this issue Mar 26, 2019 · 3 comments

Comments

@uttkarsh-26
Copy link

uttkarsh-26 commented Mar 26, 2019

@dpi
Fatal error: Declaration of Drupal\rng\Plugin\Menu\LocalAction\ResetAccessRules::getTitle() must be compatible with Drupal\Core\Menu\LocalActionDefault::getTitle(?Symfony\Component\HttpFoundation\Request $request = NULL) in /var/www/html/web/modules/contrib/rng/src/Plugin/Menu/LocalAction/ResetAccessRules.php on line 15
Here is a patch for it.

diff --git a/src/Plugin/Menu/LocalAction/ResetAccessRules.php b/src/Plugin/Menu/LocalAction/ResetAccessRules.php
index 4a67235..28c6bc4 100644
--- a/src/Plugin/Menu/LocalAction/ResetAccessRules.php
+++ b/src/Plugin/Menu/LocalAction/ResetAccessRules.php
@@ -8,6 +8,7 @@ use Drupal\rng\EventManagerInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Drupal\Core\StringTranslation\StringTranslationTrait;
+use Symfony\Component\HttpFoundation\Request;
 
 /**
  * Modifies the reset access rules action.
@@ -70,7 +71,7 @@ class ResetAccessRules extends LocalActionDefault {
   /**
    * {@inheritdoc}
    */
-  public function getTitle() {
+  public function getTitle(Request $request = NULL) {
     $route = $this->routeProvider->getRouteByName($this->getRouteName());
     $param = $route->getDefault('event');
@uttkarsh-26
Copy link
Author

Don't have access to create PR otherwise would have done it.

@uttkarsh-26
Copy link
Author

#192

@brandonratz
Copy link

Patch solve the issue for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants