Exemplo n.º 1
0
 /**
  * Get rights for an item _ may be overload by object
  *
  * @since version 0.85
  *
  * @param $interface   string   (defalt 'central')
  *
  * @return array of rights to display
  **/
 function getRights($interface = 'central')
 {
     $values = array(CREATE => __('Create'), READ => __('Read'), UPDATE => __('Update'), PURGE => array('short' => __('Purge'), 'long' => _x('button', 'Delete permanently')));
     $values += ObjectLock::getRightsToAdd(get_class($this), $interface);
     if ($this->maybeDeleted()) {
         $values[DELETE] = array('short' => __('Delete'), 'long' => _x('button', 'Put in dustbin'));
     }
     if ($this->usenotepad) {
         $values[READNOTE] = array('short' => __('Read notes'), 'long' => __("Read the item's notes"));
         $values[UPDATENOTE] = array('short' => __('Update notes'), 'long' => __("Update the item's notes"));
     }
     return $values;
 }