<?php defined('HOSTCMS') || exit('HostCMS: access denied.'); /** * @author Kuts Artem, KAD Systems (©) 2015 * @date 10-02-2015 Core_Event::attach('Structure_Controller_Breadcrumbs.onBeforeShow', array('Kad_Structure_Controller_Breadcrumbs_Shortcuts', 'onBeforeShow')); Core_Event::attach('Structure_Controller_Breadcrumbs.onAfterShow', array('Kad_Structure_Controller_Breadcrumbs_Shortcuts', 'onAfterShow')); */ class Kad_Structure_Controller_Breadcrumbs_Shortcuts { static public function onBeforeShow($object, $operation) { if (Core_Page::instance()->object instanceof Shop_Controller_Show) { if (Core_Array::getGet('from')) { define('BS_CURRENT_SHOP_GROUP', Core_Page::instance()->object->group); Core_Page::instance()->object->group = Core_Array::getGet('from'); } } } static public function onAfterShow($object, $operation) { if (defined('BS_CURRENT_SHOP_GROUP')) { Core_Page::instance()->object->group = BS_CURRENT_SHOP_GROUP; } } }