/** * Check availability of adding sub category * * @return boolean */ public function canAddSubCategory() { $options = new Varien_Object(array('is_allow' => true)); Mage::dispatchEvent('adminhtml_catalog_category_tree_can_add_sub_category', array('category' => $this->getCategory(), 'options' => $options, 'store' => $this->getStore()->getId())); return $options->getIsAllow(); }
public function canAddSubPage() { $options = new Varien_Object(array('is_allow' => true)); Mage::dispatchEvent('adminhtml_page_tree_can_add_sub_page', array('page' => $this->getPage(), 'options' => $options, 'store' => $this->getStore()->getId())); return $options->getIsAllow(); }