Example #1
0
 /**
  * [Node] Get buttons to display in tree
  * Example code explains return value
  * @endcode
  * @param	string	$url		Base URL
  * @param	bool	$subnode	Is this a subnode?
  * @return	array
  */
 public function getButtons($url, $subnode = FALSE)
 {
     $buttons = parent::getButtons($url, $subnode);
     if (isset($buttons['copy'])) {
         unset($buttons['copy']);
     }
     if (isset($buttons['empty'])) {
         unset($buttons['empty']);
     }
     /* The member marker group is protected, can't be deleted */
     if (isset($buttons['delete']) and $this->protected) {
         unset($buttons['delete']);
     }
     if ($this->type == 'custom' and isset($buttons['edit'])) {
         $buttons['import'] = array('icon' => 'upload', 'title' => 'import', 'link' => $url->setQueryString(array('do' => 'import', 'id' => $this->_id)), 'data' => array('ipsDialog' => '', 'ipsDialog-title' => \IPS\Member::loggedIn()->language()->addToStack('import')));
     }
     return $buttons;
 }