CommonDBTM::canViewItem PHP Method

canViewItem() public method

Have I the right to "view" the Object May be overloaded if needed
public canViewItem ( ) : booleen
return booleen
    function canViewItem()
    {
        if (!$this->checkEntity(true)) {
            return false;
        }
        // else : Global item
        return true;
    }

Usage Example

Exemplo n.º 1
0
 /**
  *  Special case: a private bookmark has entities_id==-1 => we cannot check it
  * @see CommonDBTM::canViewItem()
  *
  * @since version 0.85
  **/
 function canViewItem()
 {
     if ($this->fields['is_private'] == 1 && $this->fields['users_id'] == Session::getLoginUserID()) {
         return true;
     }
     return parent::canViewItem();
 }
CommonDBTM