Example #1
0
 /**
  * Modify the default layout for category fields
  */
 public function getDisplay(LayoutInterface $layout = NULL)
 {
     $layout = $layout ?: new CategoryFieldLayout();
     return parent::getDisplay($layout);
 }
Example #2
0
 public function onBeforeDelete()
 {
     parent::onBeforeDelete();
     foreach ($this->getModulesWithTabs() as $name => $info) {
         include_once $info->getPath() . '/tab.' . $name . '.php';
         $class_name = ucfirst($name) . '_tab';
         $OBJ = new $class_name();
         if (method_exists($OBJ, 'delete') === TRUE) {
             $OBJ->delete(array($this->entry_id));
         }
     }
 }