You are here

function _content_access_remove_acls in Content Access 8

Same name and namespace in other branches
  1. 6 content_access.admin.inc \_content_access_remove_acls()
  2. 7 content_access.module \_content_access_remove_acls()

Detaches all our ACLs for the nodes of the given type.

1 call to _content_access_remove_acls()
ContentAccessAdminSettingsForm::submitForm in src/Form/ContentAccessAdminSettingsForm.php
Form submission handler.

File

./content_access.module, line 744
Content access module file.

Code

function _content_access_remove_acls($type) {
  $result = \Drupal::database()
    ->query("SELECT n.nid FROM {node} n WHERE type = :type", [
    'type' => $type,
  ]);
  foreach ($result as $node) {
    acl_node_clear_acls($node->nid, 'content_access');
  }
}