function access_grant_save in Access Control Kit 7
Saves an access grant.
Parameters
object $grant: An access grant.
Return value
int Status constant indicating whether the grant was inserted (SAVED_NEW) or updated (SAVED_UPDATED). When inserting a new grant, $grant->gid will contain the ID of the newly created grant.
See also
AccessGrantEntityController::save()
7 calls to access_grant_save()
- AccessAPITest::testHandlerMethods in ./
access.test - Test access arbitration through our dummy handler.
- AccessGrantFunctionTest::testGrantCRUD in ./
access.test - Test basic create, read, update, and delete functions.
- AccessGrantFunctionTest::testGrantStaticReset in ./
access.test - Ensure that the access grant static reset works correctly.
- AccessGrantInterfaceTest::testGrantDelete in ./
access.test - Delete an access grant via the user interface.
- AccessGrantInterfaceTest::testGrantInterface in ./
access.test - Create and edit an access grant via the user interface.
File
- ./
access.module, line 187 - The access control kit module.
Code
function access_grant_save($grant) {
return entity_get_controller('access_grant')
->save($grant);
}