You are here

function node_clone_is_permitted in Node clone 8

3 calls to node_clone_is_permitted()
node_clone_action_clone in ./node_clone.module
Action callback.
node_clone_node_prepopulate in ./node_clone.pages.inc
Clones a node - prepopulate a node editing form
node_clone_node_save in ./node_clone.pages.inc
Clones a node by directly saving it.

File

./node_clone.module, line 27
Allow users to make a copy of an item of content (a node) and then edit that copy.

Code

function node_clone_is_permitted($type) {

  // @FIXME
  // Could not extract the default value because it is either indeterminate, or
  // not scalar. You'll need to provide a default value in
  // config/install/node_clone.settings.yml and config/schema/node_clone.schema.yml.
  $omitted = \Drupal::config('node_clone.settings')
    ->get('node_clone_omitted');
  return empty($omitted[$type]);
}