function _domain_taxonomy_store_grants in Domain Taxonomy 7
Same name and namespace in other branches
- 6 domain_taxonomy.module \_domain_taxonomy_store_grants()
- 7.3 domain_taxonomy.module \_domain_taxonomy_store_grants()
1 call to _domain_taxonomy_store_grants()
File
- ./
domain_taxonomy.module, line 332
Code
function _domain_taxonomy_store_grants($tid, $grants = array()) {
if ($tid > 0 && !empty($grants)) {
db_delete('domain_taxonomy_access')
->condition('tid', $tid)
->execute();
foreach ($grants as $grant) {
db_insert('domain_taxonomy_access')
->fields(array(
'tid' => $tid,
'gid' => $grant['gid'],
'realm' => $grant['realm'],
'grant_view' => $grant['grant_view'],
'grant_update' => $grant['grant_update'],
'grant_delete' => $grant['grant_delete'],
))
->execute();
}
}
}