public function deleteButton($row, $href, $label, $title, $icon, $attributes) { $this->Import('BackendUser', 'User'); if ($this->User->isAdmin || !in_array($row['type'], $this->User->contentelements)) { $objCallback = new tl_content(); return $objCallback->deleteElement($row, $href, $label, $title, $icon, $attributes); } return ''; }
/** * Hide delete button for disabled content elements */ public function deleteButton($row, $href, $label, $title, $icon, $attributes) { if ($this->User->isAdmin || in_array($row['type'], (array) $this->User->elements)) { $objCallback = new tl_content(); return $objCallback->deleteElement($row, $href, $label, $title, $icon, $attributes); } return ''; }