You are here

public function AccessStorage::deleteTermPermissionsByRoleIds in Permissions by Term 8

Same name and namespace in other branches
  1. 8.2 src/Service/AccessStorage.php \Drupal\permissions_by_term\Service\AccessStorage::deleteTermPermissionsByRoleIds()

Parameters

array $aRoleIdsAccessRemove:

int $term_id:

1 call to AccessStorage::deleteTermPermissionsByRoleIds()
AccessStorage::saveTermPermissions in src/Service/AccessStorage.php
*

File

src/Service/AccessStorage.php, line 266

Class

AccessStorage
Class AccessStorage.

Namespace

Drupal\permissions_by_term\Service

Code

public function deleteTermPermissionsByRoleIds($aRoleIdsAccessRemove, $term_id, $langcode) {
  foreach ($aRoleIdsAccessRemove as $sRoleId) {
    $this->database
      ->delete('permissions_by_term_role')
      ->condition('rid', $sRoleId, '=')
      ->condition('tid', $term_id, '=')
      ->condition('langcode', $langcode, '=')
      ->execute();
  }
}