node_permissions_get_configured_types
function node_permissions_get_configured_types
node_permissions_get_configured_types()
Returns an array of node types that should be managed by permissions.
By default, this will include all node types in the system. To exclude a specific node from getting permissions defined for it, set the node_permissions_$type variable to 0. Core does not provide an interface for doing so. However, contrib modules may exclude their own nodes in hook_install(). Alternatively, contrib modules may configure all node types at once, or decide to apply some other hook_node_access() implementation to some or all node types.
Return value
An array of node types managed by this module.
Related topics
File
- modules/node/node.module, line 3162
- The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.
Code
function node_permissions_get_configured_types() { $configured_types = array(); foreach (node_type_get_types() as $type => $info) { if (variable_get('node_permissions_' . $type, 1)) { $configured_types[] = $type; } } return $configured_types; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!node!node.module/function/node_permissions_get_configured_types/7.x