deleteElement() public method

Return the delete content element button
public deleteElement ( array $row, string $href, string $label, string $title, string $icon, string $attributes ) : string
$row array
$href string
$label string
$title string
$icon string
$attributes string
return string
Example #1
0
 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 '';
 }
Example #2
0
 /**
  * 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 '';
 }