public function AccessStorage::getPreparedDataForDatabaseQueries in Permissions by Term 8.2
Same name and namespace in other branches
- 8 src/Service/AccessStorage.php \Drupal\permissions_by_term\Service\AccessStorage::getPreparedDataForDatabaseQueries()
Prepares the data which has to be applied to the database.
Parameters
array $aExistingUserPermissions: The permissions for existing user.
array $aSubmittedUserIdsGrantedAccess: The user ids which get access.
array $aExistingRoleIdsGrantedAccess: The existing role ids.
array $aSubmittedRolesGrantedAccess: The user roles which get access.
Return value
array User ID and role data.
1 call to AccessStorage::getPreparedDataForDatabaseQueries()
- AccessStorage::saveTermPermissions in src/
Service/ AccessStorage.php
File
- src/
Service/ AccessStorage.php, line 491
Class
- AccessStorage
- Class AccessStorage.
Namespace
Drupal\permissions_by_term\ServiceCode
public function getPreparedDataForDatabaseQueries($aExistingUserPermissions, $aSubmittedUserIdsGrantedAccess, $aExistingRoleIdsGrantedAccess, $aSubmittedRolesGrantedAccess) {
// Fill array with user ids to remove permission.
$aRet['UserIdPermissionsToRemove'] = $this
->getArrayItemsToRemove($aExistingUserPermissions, $aSubmittedUserIdsGrantedAccess);
// Fill array with user ids to add permission.
$aRet['UserIdPermissionsToAdd'] = $this
->getArrayItemsToAdd($aSubmittedUserIdsGrantedAccess, $aExistingUserPermissions);
// Fill array with user roles to remove permission.
$aRet['UserRolePermissionsToRemove'] = $this
->getArrayItemsToRemove($aExistingRoleIdsGrantedAccess, $aSubmittedRolesGrantedAccess);
// Fill array with user roles to add permission.
$aRet['aRoleIdPermissionsToAdd'] = $this
->getArrayItemsToAdd($aSubmittedRolesGrantedAccess, $aExistingRoleIdsGrantedAccess);
return $aRet;
}