system/modules/DocumentManagementSystem/classes/DmsLoader.php
private function buildAccessRight($objAccessRight)
  {
    $accessRight = new \AccessRight($objAccessRight->id, $objAccessRight->member_group);
    $accessRight->categoryId = $objAccessRight->pid;
    $strRight = \AccessRight::READ;
    $accessRight->$strRight = $objAccessRight->right_read;
    $strRight = \AccessRight::UPLOAD;
    $accessRight->$strRight = $objAccessRight->right_upload;
    $strRight = \AccessRight::DELETE;
    $accessRight->$strRight = $objAccessRight->right_delete;
    $strRight = \AccessRight::EDIT;
    $accessRight->$strRight = $objAccessRight->right_edit;
    $strRight = \AccessRight::PUBLISH;
    $accessRight->$strRight = $objAccessRight->right_publish;
    $accessRight->active = $objAccessRight->published;
    $accessRight->activationStart = $objAccessRight->start;
    $accessRight->activationStop = $objAccessRight->stop;
    
    // HOOK: modify the access right
    if (isset($GLOBALS['TL_HOOKS']['dmsModifyLoadedAccessRight']) && is_array($GLOBALS['TL_HOOKS']['dmsModifyLoadedAccessRight']))
    {
      foreach ($GLOBALS['TL_HOOKS']['dmsModifyLoadedAccessRight'] as $callback)
      {
        $this->import($callback[0]);
        $accessRight = $this->{$callback[0]}->{$callback[1]}($accessRight, $objAccessRight);
      }
    }
    
    return $accessRight;
  }
private function buildAccessRight($objAccessRight)
  {
    $accessRight = new \AccessRight($objAccessRight->id, $objAccessRight->member_group);
    $accessRight->categoryId = $objAccessRight->pid;
    $strRight = \AccessRight::READ;
    $accessRight->$strRight = $objAccessRight->right_read;
    $strRight = \AccessRight::UPLOAD;
    $accessRight->$strRight = $objAccessRight->right_upload;
    $strRight = \AccessRight::DELETE;
    $accessRight->$strRight = $objAccessRight->right_delete;
    $strRight = \AccessRight::EDIT;
    $accessRight->$strRight = $objAccessRight->right_edit;
    $strRight = \AccessRight::PUBLISH;
    $accessRight->$strRight = $objAccessRight->right_publish;
    $accessRight->active = $objAccessRight->published;
    $accessRight->activationStart = $objAccessRight->start;
    $accessRight->activationStop = $objAccessRight->stop;
    
    // HOOK: modify the access right
    if (isset($GLOBALS['TL_HOOKS']['dmsModifyLoadedAccessRight']) && is_array($GLOBALS['TL_HOOKS']['dmsModifyLoadedAccessRight']))
    {
      foreach ($GLOBALS['TL_HOOKS']['dmsModifyLoadedAccessRight'] as $callback)
      {
        $this->import($callback[0]);
        $accessRight = $this->{$callback[0]}->{$callback[1]}($accessRight, $objAccessRight);
      }
    }
    
    return $accessRight;
  }
private function buildAccessRight ( $ objAccessRight ) { $ accessRight = new \ AccessRight ( $ objAccessRight -> id , $ objAccessRight -> member_group ) ; $ accessRight -> categoryId = $ objAccessRight -> pid ; $ strRight = \ AccessRight :: READ ; $ accessRight -> $ strRight = $ objAccessRight -> right_read ; $ strRight = \ AccessRight :: UPLOAD ; $ accessRight -> $ strRight = $ objAccessRight -> right_upload ; $ strRight = \ AccessRight :: DELETE ; $ accessRight -> $ strRight = $ objAccessRight -> right_delete ; $ strRight = \ AccessRight :: EDIT ; $ accessRight -> $ strRight = $ objAccessRight -> right_edit ; $ strRight = \ AccessRight :: PUBLISH ; $ accessRight -> $ strRight = $ objAccessRight -> right_publish ; $ accessRight -> active = $ objAccessRight -> published ; $ accessRight -> activationStart = $ objAccessRight -> start ; $ accessRight -> activationStop = $ objAccessRight -> stop ; // HOOK: modify the access right if ( isset ( $ GLOBALS [ 'TL_HOOKS' ] [ 'dmsModifyLoadedAccessRight' ] ) && is_array ( $ GLOBALS [ 'TL_HOOKS' ] [ 'dmsModifyLoadedAccessRight' ] ) ) { foreach ( $ GLOBALS [ 'TL_HOOKS' ] [ 'dmsModifyLoadedAccessRight' ] as $ callback ) { $ this -> import ( $ callback [ 0 ] ) ; $ accessRight = $ this -> { $ callback [ 0 ] } -> { $ callback [ 1 ] } ( $ accessRight , $ objAccessRight ) ; } } return $ accessRight ; }
Builds an access right from a database result.

@param  DatabaseResult  $objAccessRight  The database result.
@return  accessRight  The created access right.
Builds an access right from a database result .