public function OrganigramsController::viewOrganigramAccess in Organigrams 8
Checks if a vocabulary contains organigrams settings.
Parameters
\Drupal\taxonomy\VocabularyInterface $taxonomy_vocabulary: The vocabulary to perform the access check on.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
1 string reference to 'OrganigramsController::viewOrganigramAccess'
File
- src/
Controller/ OrganigramsController.php, line 104
Class
- OrganigramsController
- Provides route responses for organigrams.module.
Namespace
Drupal\organigrams\ControllerCode
public function viewOrganigramAccess(VocabularyInterface $taxonomy_vocabulary) {
if (!empty($taxonomy_vocabulary
->getThirdPartySettings('organigrams'))) {
return AccessResult::allowed();
}
return AccessResult::forbidden();
}