Skip to content

Instantly share code, notes, and snippets.

@a-fro
Created January 7, 2020 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a-fro/ec31b2c83dd74c3ef1796bd880f63f6b to your computer and use it in GitHub Desktop.
Save a-fro/ec31b2c83dd74c3ef1796bd880f63f6b to your computer and use it in GitHub Desktop.
Drupal menu_condition patch
diff --git a/src/Plugin/Condition/MenuPosition.php b/src/Plugin/Condition/MenuPosition.php
index 89e640a..099b6c0 100644
--- a/src/Plugin/Condition/MenuPosition.php
+++ b/src/Plugin/Condition/MenuPosition.php
@@ -97,10 +97,9 @@ class MenuPosition extends ConditionPluginBase implements ConditionInterface, Co
*/
public function summary() {
list($menu_name, $link_plugin_id) = explode(':', $this->configuration['menu_parent'], 2);
- $menu_link = $this->pluginManagerMenuLink->createInstance($link_plugin_id);
return $this->t(
- 'The menu item @link-title is either active or is in the active trail.', [
- '@link-title' => $menu_link->getTitle(),
+ 'The menu item is either active or is in the active trail of the menu %menu_name.', [
+ '%menu_name' => $menu_name,
]
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment