Exemple #1
0
 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;
 }
Exemple #2
0
 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;
 }