Public Member Functions | |
saveAction () | |
Protected Member Functions | |
_isAllowed () |
Definition at line 35 of file GroupController.php.
_isAllowed | ( | ) | [protected] |
Reimplemented from Mage_Adminhtml_Controller_Action.
Definition at line 55 of file GroupController.php.
00056 { 00057 return Mage::getSingleton('admin/session')->isAllowed('catalog/products'); 00058 }
saveAction | ( | ) |
Definition at line 37 of file GroupController.php.
00038 { 00039 $model = Mage::getModel('eav/entity_attribute_group'); 00040 00041 $model->setAttributeGroupName($this->getRequest()->getParam('attribute_group_name')) 00042 ->setAttributeSetId($this->getRequest()->getParam('attribute_set_id')); 00043 00044 if( $model->itemExists() ) { 00045 Mage::getSingleton('adminhtml/session')->addError(Mage::helper('catalog')->__('Error while saving this group. Group with the same name already exists.')); 00046 } else { 00047 try { 00048 $model->save(); 00049 } catch (Exception $e) { 00050 Mage::getSingleton('adminhtml/session')->addError(Mage::helper('catalog')->__('Error while saving this group. Please try again later.')); 00051 } 00052 } 00053 }