You are here

function acl_node_add_acl_record in ACL 8

Same name and namespace in other branches
  1. 7 acl.module \acl_node_add_acl_record()

Provide access control to a node based upon an ACL id.

1 call to acl_node_add_acl_record()
acl_node_add_acl in ./acl.module
Provide access control to a node based upon an ACL id.

File

./acl.module, line 183
An API module providing by-user access control lists.

Code

function acl_node_add_acl_record(array $record) {
  $database = \Drupal::database();
  $database
    ->delete('acl_node')
    ->condition('acl_id', $record['acl_id'])
    ->condition('nid', $record['nid'])
    ->execute();
  $database
    ->insert('acl_node')
    ->fields($record)
    ->execute();
}