class MergeAccess in Term Merge 8
Verifies that a given user is allowed to merge terms.
Hierarchy
- class \Drupal\term_merge\Access\MergeAccess implements AccessInterface
Expanded class hierarchy of MergeAccess
1 string reference to 'MergeAccess'
1 service uses MergeAccess
File
- src/
Access/ MergeAccess.php, line 13
Namespace
Drupal\term_merge\AccessView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MergeAccess:: |
public | function | Checks access for a specific request. |