You are here

public function NodeOrderAccess::adminOrder in Node Order 8

Administer order.

Parameters

\Drupal\taxonomy\Entity\Term $taxonomy_term:

Return value

\Drupal\Core\Access\AccessResult Access result.

1 string reference to 'NodeOrderAccess::adminOrder'
nodeorder.routing.yml in ./nodeorder.routing.yml
nodeorder.routing.yml

File

src/Access/NodeOrderAccess.php, line 85

Class

NodeOrderAccess

Namespace

Drupal\nodeorder\Access

Code

public function adminOrder(Term $taxonomy_term) {
  return $this
    ->weightExists()
    ->isAllowed() && $this
    ->isVocabularyOrderable($taxonomy_term)
    ->isAllowed() ? AccessResult::allowed() : AccessResult::forbidden();
}