function NodeTestHooks::nodeGrantsAlter

Implements hook_node_grants_alter().

File

core/modules/node/tests/modules/node_test/src/Hook/NodeTestHooks.php, line 126

Class

NodeTestHooks
Hook implementations for node_test.

Namespace

Drupal\node_test\Hook

Code

public function nodeGrantsAlter(&$grants, AccountInterface $account, $operation) {
    // Return an empty array of grants to prove that we can alter by reference.
    $grants = [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.