You are here

public function OrganigramsController::isOrganigram in Organigrams 8.2

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::isOrganigram'
organigrams.routing.yml in ./organigrams.routing.yml
organigrams.routing.yml

File

src/Controller/OrganigramsController.php, line 172

Class

OrganigramsController
Provides route responses for organigrams.module.

Namespace

Drupal\organigrams\Controller

Code

public function isOrganigram(VocabularyInterface $taxonomy_vocabulary) {
  if (!empty($taxonomy_vocabulary
    ->getThirdPartySettings('organigrams'))) {
    return AccessResult::allowed();
  }
  return AccessResult::forbidden();
}