예제 #1
0
 /**
  * Check availability of adding child Category
  *
  * @return boolean
  */
 public function canAddChildCategory()
 {
     $options = new \Magento\Framework\DataObject(['is_allow' => true]);
     $this->_eventManager->dispatch('adminhtml_mageplaza_blog_category_tree_can_add_child_category', ['category' => $this->getCategory(), 'options' => $options]);
     return $options->getIsAllow();
 }
예제 #2
0
 /**
  * Check availability of adding sub category
  *
  * @return boolean
  */
 public function canAddSubCategory()
 {
     $options = new \Magento\Framework\DataObject(['is_allow' => true]);
     $this->_eventManager->dispatch('adminhtml_catalog_category_tree_can_add_sub_category', ['category' => $this->getCategory(), 'options' => $options, 'store' => $this->getStore()->getId()]);
     return $options->getIsAllow();
 }