You are here

constant NODE_ACCESS_EXAMPLE_GRANT_ALL in Examples for Developers 6

Same name and namespace in other branches
  1. 7 node_access_example/node_access_example.module \NODE_ACCESS_EXAMPLE_GRANT_ALL

Here we define a constant for our node access grant ID, for the example realm. This ID could be any integer, but here we choose 23, because it is this author's favorite number.

Related topics

2 uses of NODE_ACCESS_EXAMPLE_GRANT_ALL
node_access_example_node_access_records in node_access_example/node_access_example.module
Implements hook_node_access_records().
node_access_example_node_grants in node_access_example/node_access_example.module
Implements hook_node_grants().

File

node_access_example/node_access_example.module, line 74
This is an example illustrating how to restrict access to nodes based on some criterion associated with the user.

Code

define('NODE_ACCESS_EXAMPLE_GRANT_ALL', 23);