forked from owenmorrill/subtonode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubtonode.module
More file actions
37 lines (30 loc) · 914 Bytes
/
subtonode.module
File metadata and controls
37 lines (30 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* @file
* Contains subtonode.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\node\Entity\Node;
use Drupal\webform\Entity\WebformSubmission;
/**
* Implements hook_help().
*/
function subtonode_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the subtonode module.
case 'help.page.subtonode':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Create nodes from webform submissions.') . '</p>';
return $output;
default:
}
}
function subtonode_page_bottom(array &$page_bottom) {
$sid = 28;
$node_details = WebformSubmission::load($sid);
$node = Node::load($sid);
$submission_array = $node_details->getOriginalData();
//var_dump($submission_array['audience']);
//$page_bottom['subtonode'] = ['#markup' => '<a href="subtonode">Make it so</a>'];
}