function node_test_node_grants_alter

Same name in other branches
  1. 7.x modules/node/tests/node_test.module \node_test_node_grants_alter()
  2. 9 core/modules/node/tests/modules/node_test/node_test.module \node_test_node_grants_alter()
  3. 10 core/modules/node/tests/modules/node_test/node_test.module \node_test_node_grants_alter()
  4. 11.x core/modules/node/tests/modules/node_test/node_test.module \node_test_node_grants_alter()

Implements hook_node_grants_alter().

File

core/modules/node/tests/modules/node_test/node_test.module, line 118

Code

function node_test_node_grants_alter(&$grants, AccountInterface $account, $op) {
    // 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.