From 8816fcfc51a8e6693b9b0db58ea184236b44ebaf Mon Sep 17 00:00:00 2001 From: Alexander Menk Date: Wed, 13 Jun 2012 17:43:52 +0300 Subject: [PATCH] Added removeLink method. Is useful to be called in layout updates to remove a link. --- .../core/Mage/Customer/Block/Account/Navigation.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/code/core/Mage/Customer/Block/Account/Navigation.php b/app/code/core/Mage/Customer/Block/Account/Navigation.php index 2a5e403a31ee3..1a602034cf71b 100644 --- a/app/code/core/Mage/Customer/Block/Account/Navigation.php +++ b/app/code/core/Mage/Customer/Block/Account/Navigation.php @@ -50,6 +50,16 @@ public function addLink($name, $path, $label, $urlParams=array()) return $this; } + /** + * Removes a link from the navigation + * + * @param $name Internal name of the link + */ + public function removeLink($name) + { + unset($this->_links[$name]); + return $this; + } public function setActive($path) { $this->_activeLink = $this->_completePath($path);