You are here

function acl_get_id_by_figure in ACL 8

Get the id of an ACL by figure.

1 call to acl_get_id_by_figure()
AclMigrationTestTrait::testMigration in src/Tests/AclMigrationTestTrait.php
Tests migration of ACL List.

File

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

Code

function acl_get_id_by_figure($module, $figure) {
  $query = \Drupal::database()
    ->select('acl', 'a')
    ->fields('a', [
    'acl_id',
  ])
    ->condition('a.module', $module)
    ->condition('a.figure', $figure);
  return $query
    ->execute()
    ->fetchField();
}