2013-06-16 09:40:11 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
2014-03-27 11:54:40 +00:00
|
|
|
* Contains \Drupal\user\RoleStorageInterface.
|
2013-06-16 09:40:11 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Drupal\user;
|
|
|
|
|
2014-03-27 11:54:40 +00:00
|
|
|
use Drupal\Core\Config\Entity\ConfigEntityStorageInterface;
|
2013-06-16 09:40:11 +00:00
|
|
|
|
|
|
|
/**
|
2014-08-22 11:59:25 +00:00
|
|
|
* Defines an interface for role entity storage classes.
|
2013-06-16 09:40:11 +00:00
|
|
|
*/
|
2014-03-27 11:54:40 +00:00
|
|
|
interface RoleStorageInterface extends ConfigEntityStorageInterface {
|
2013-06-16 09:40:11 +00:00
|
|
|
|
2014-07-15 09:56:56 +00:00
|
|
|
/**
|
|
|
|
* Returns whether a permission is in one of the passed in roles.
|
|
|
|
*
|
|
|
|
* @param string $permission
|
|
|
|
* The permission.
|
|
|
|
* @param array $rids
|
|
|
|
* The list of role IDs to check.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
* TRUE is the permission is in at least one of the roles. FALSE otherwise.
|
|
|
|
*/
|
|
|
|
public function isPermissionInRoles($permission, array $rids);
|
|
|
|
|
2013-06-16 09:40:11 +00:00
|
|
|
/**
|
|
|
|
* Delete role references.
|
|
|
|
*
|
|
|
|
* @param array $rids
|
2014-03-27 11:54:40 +00:00
|
|
|
* The list of role IDs being deleted. The storage should
|
2013-06-16 09:40:11 +00:00
|
|
|
* remove permission and user references to this role.
|
|
|
|
*/
|
|
|
|
public function deleteRoleReferences(array $rids);
|
|
|
|
}
|