1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
<?php
/* --------------------------------------------------------------
AdminAccessRoleManagerInterface.inc.php 2018-01-15
Gambio GmbH
http://www.gambio.de
Copyright (c) 2017 Gambio GmbH
Released under the GNU General Public License (Version 2)
[http://www.gnu.org/licenses/gpl-2.0.html]
--------------------------------------------------------------
*/
/**
* Interface AdminAccessRoleManagerInterface
*
* @category System
* @package AdminAccess
* @subpackage Managers
*/
interface AdminAccessRoleManagerInterface
{
/**
* Returns a collection of all roles.
*
* @return AdminAccessRoleCollection Role collection with all available roles.
*/
public function getAllRoles();
/**
* Creates a new role.
*
* @param KeyValueCollection $name Collection with the role names. Index of a role name must be
* his language code.
* @param KeyValueCollection $description Collection with the role descriptions. Index of a role name
* must be his language code.
* @param IntType $sortOrder Roles sort order.
* @param BoolType $unknownReadingGranted Value of the reading permission for unknown groups.
* @param BoolType $unknownWritingGranted Value of the writing permission for unknown groups.
* @param BoolType $unknownDeletingGranted Value of the deleting permission for unknown groups.
*
* @return AdminAccessRoleInterface Returns the create role.
*/
public function createNewRole(KeyValueCollection $name,
KeyValueCollection $description,
IntType $sortOrder,
BoolType $unknownReadingGranted,
BoolType $unknownWritingGranted,
BoolType $unknownDeletingGranted);
/**
* Updates a role by a given role ID.
*
* @param IdType $id Role ID to remove permission from.
* @param KeyValueCollection $newName Collection with the new role names. Index of a role name must
* be his language code.
* @param KeyValueCollection $newDescription Collection with the new role descriptions. Index of a role
* name must be his language code.
* @param IntType $newSortOrder New roles sort order.
* @param BoolType $unknownReadingGranted Value of the reading permission for unknown groups.
* @param BoolType $unknownWritingGranted Value of the writing permission for unknown groups.
* @param BoolType $unknownDeletingGranted Value of the deleting permission for unknown groups.
*
* @return AdminAccessRoleManager Returns same instance for chained method calls.
*/
public function updateRole(IdType $id,
KeyValueCollection $newName,
KeyValueCollection $newDescription,
IntType $newSortOrder,
BoolType $unknownReadingGranted,
BoolType $unknownWritingGranted,
BoolType $unknownDeletingGranted);
/**
* Deletes role by a given role ID.
*
* @param IdType $id ID of the role that should be deleted.
*
* @return AdminAccessRoleManager Returns same instance for chained method calls.
*/
public function deleteRole(IdType $id);
/**
* Returns a role by a given role ID.
*
* @param IdType $id ID of the requested role.
*
* @return AdminAccessRoleInterface
*/
public function getRoleById(IdType $id);
}