/** * Modify the default layout for category fields */ public function getDisplay(LayoutInterface $layout = NULL) { $layout = $layout ?: new CategoryFieldLayout(); return parent::getDisplay($layout); }
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)); } } }