You are here

class MergeAccess in Term Merge 8

Verifies that a given user is allowed to merge terms.

Hierarchy

Expanded class hierarchy of MergeAccess

1 string reference to 'MergeAccess'
term_merge.services.yml in ./term_merge.services.yml
term_merge.services.yml
1 service uses MergeAccess
term_merge.access_checker in ./term_merge.services.yml
Drupal\term_merge\Access\MergeAccess

File

src/Access/MergeAccess.php, line 13

Namespace

Drupal\term_merge\Access
View source
class MergeAccess implements AccessInterface {

  /**
   * Checks access for a specific request.
   *
   * @param \Drupal\taxonomy\Entity\Vocabulary $taxonomy_vocabulary
   *   Run access checks against this vocabulary.
   * @param \Drupal\Core\Session\AccountInterface $account
   *   Run access checks for this account.
   *
   * @return \Drupal\Core\Access\AccessResultInterface
   *   The access result.
   */
  public function access(Vocabulary $taxonomy_vocabulary, AccountInterface $account) {
    return AccessResult::allowedIfHasPermission($account, 'edit terms in ' . $taxonomy_vocabulary
      ->id());
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MergeAccess::access public function Checks access for a specific request.