function webform_protected_downloads_node_is_webform in Webform Protected Downloads 7
Same name and namespace in other branches
- 6 webform_protected_downloads.module \webform_protected_downloads_node_is_webform()
Check whether the given node is used as a webform
Parameters
object $node:
Return value
boolean
5 calls to webform_protected_downloads_node_is_webform()
- webform_protected_downloads_contextual_links_view_alter in ./
webform_protected_downloads.module - Implements hook_contextual_links_view_alter().
- webform_protected_downloads_form_alter in ./
webform_protected_downloads.module - Implementation of hook_form_alter().
- webform_protected_downloads_node_insert in ./
webform_protected_downloads.module - Implementation of hook_insert().
- webform_protected_downloads_node_load in ./
webform_protected_downloads.module - Implementation of hook_node_load().
- webform_protected_downloads_node_view in ./
webform_protected_downloads.module - Implementation of hook_node_view().
File
- ./
webform_protected_downloads.module, line 461 - This file contains hook declarations and functions for the Webform Protected Downloads module.
Code
function webform_protected_downloads_node_is_webform($node) {
// API change introduced by https://drupal.org/node/2062235
if (function_exists('webform_node_types')) {
$webform_types = webform_node_types();
}
else {
$webform_types = webform_variable_get('webform_node_types');
}
return in_array($node->type, $webform_types);
}