public function _initBrand() { $brandId = (int) $this->getRequest()->getParam('brand_id', false); if (!$brandId) { return false; } try { $brand = $this->_brandModel->load($brandId); } catch (NoSuchEntityException $e) { return false; } $this->_coreRegistry->register('current_brand', $brand); return $brand; }
public function _initGroup() { $groupId = (int) $this->getRequest()->getParam('group_id', false); if (!$groupId) { return false; } try { $group = $this->_groupModel->load($groupId); } catch (NoSuchEntityException $e) { return false; } $this->_coreRegistry->register('current_group_brand', $group); return $group; }