eZ\Publish\Core\Persistence\Legacy\User\Gateway::assignRole PHP Method

assignRole() abstract public method

Assigns role to user with given limitation.
abstract public assignRole ( mixed $contentId, mixed $roleId, array $limitation )
$contentId mixed
$roleId mixed
$limitation array
    public abstract function assignRole($contentId, $roleId, array $limitation);

Usage Example

 /**
  * Assigns role to user with given limitation.
  *
  * @param mixed $contentId
  * @param mixed $roleId
  * @param array $limitation
  */
 public function assignRole($contentId, $roleId, array $limitation)
 {
     try {
         return $this->innerGateway->assignRole($contentId, $roleId, $limitation);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
All Usage Examples Of eZ\Publish\Core\Persistence\Legacy\User\Gateway::assignRole