You are here

function node_authlink_node_is_enabled in Node authorize link 8

Checks if a node is enabled for node_authlink

Parameters

\Drupal\node\NodeInterface $node: The node to check.

Return value

bool

2 calls to node_authlink_node_is_enabled()
NodeRevisionAccessCheck::checkAccess in src/Access/NodeRevisionAccessCheck.php
Checks node revision access.
node_authlink_node_access in ./node_authlink.module
Implements hook_node_access().

File

./node_authlink.module, line 283
Node Authlink hooks and alters.

Code

function node_authlink_node_is_enabled(NodeInterface $node) {
  $config = \Drupal::config('node_authlink.settings');
  $config_enable = $config
    ->get('enable');
  if (isset($config_enable[$node
    ->bundle()]) && $config_enable[$node
    ->bundle()]) {
    return TRUE;
  }
  return FALSE;
}