From 1786f8e907194ce644180b926c6b2f01f638ce71 Mon Sep 17 00:00:00 2001 From: Mickael Desgranges Date: Fri, 11 Oct 2013 16:42:21 +0200 Subject: [PATCH] Update blocktopmenu.php Fix: block top menu is not updated when content is added in CMS adding support of AddAfter hook for Cms, Supplier, Manufaturer and Product --- modules/blocktopmenu/blocktopmenu.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/modules/blocktopmenu/blocktopmenu.php b/modules/blocktopmenu/blocktopmenu.php index a28b4c0bc..d857362dd 100644 --- a/modules/blocktopmenu/blocktopmenu.php +++ b/modules/blocktopmenu/blocktopmenu.php @@ -72,12 +72,16 @@ class Blocktopmenu extends Module !$this->registerHook('actionObjectCategoryAddAfter') || !$this->registerHook('actionObjectCmsUpdateAfter') || !$this->registerHook('actionObjectCmsDeleteAfter') || + !$this->registerHook('actionObjectCmsAddAfter') || !$this->registerHook('actionObjectSupplierUpdateAfter') || !$this->registerHook('actionObjectSupplierDeleteAfter') || + !$this->registerHook('actionObjectSupplierAddAfter') || !$this->registerHook('actionObjectManufacturerUpdateAfter') || !$this->registerHook('actionObjectManufacturerDeleteAfter') || + !$this->registerHook('actionObjectManufacturerAddAfter') || !$this->registerHook('actionObjectProductUpdateAfter') || !$this->registerHook('actionObjectProductDeleteAfter') || + !$this->registerHook('actionObjectProductAddAfter') || !$this->registerHook('categoryUpdate') || !$this->registerHook('actionShopDataDuplication') || !$this->installDB()) @@ -858,6 +862,11 @@ class Blocktopmenu extends Module $this->clearMenuCache(); } + public function hookActionObjectCmsAddAfter($params) + { + $this->clearMenuCache(); + } + public function hookActionObjectSupplierUpdateAfter($params) { $this->clearMenuCache(); @@ -866,7 +875,12 @@ class Blocktopmenu extends Module public function hookActionObjectSupplierDeleteAfter($params) { $this->clearMenuCache(); - } + } + + public function hookActionObjectSupplierAddAfter($params) + { + $this->clearMenuCache(); + } public function hookActionObjectManufacturerUpdateAfter($params) { @@ -878,6 +892,11 @@ class Blocktopmenu extends Module $this->clearMenuCache(); } + public function hookActionObjectManufacturerAddAfter($params) + { + $this->clearMenuCache(); + } + public function hookActionObjectProductUpdateAfter($params) { $this->clearMenuCache(); @@ -888,6 +907,11 @@ class Blocktopmenu extends Module $this->clearMenuCache(); } + public function hookActionObjectProductAddAfter($params) + { + $this->clearMenuCache(); + } + public function hookCategoryUpdate($params) { $this->clearMenuCache();