You are here

function content_access_get_acl_id in Content Access 8

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

Gets the content access acl id of the node.

3 calls to content_access_get_acl_id()
ActionCommonTrait::actionUser in src/Plugin/RulesAction/ActionCommonTrait.php
Process Rule's param, and grant by the passed operation.
ContentAccessPageForm::buildForm in src/Form/ContentAccessPageForm.php
Form constructor.
content_access_delete_per_node_settings in ./content_access.module
Delete per node settings.

File

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

Code

function content_access_get_acl_id(NodeInterface $node, $op) {
  $acl_id = acl_get_id_by_name('content_access', $op . '_' . $node
    ->id());
  if (!$acl_id) {
    $acl_id = acl_create_acl('content_access', $op . '_' . $node
      ->id());
  }
  return $acl_id;
}