Security update for permissions_by_term
[yaffs-website] / web / modules / custom / yaffs_document / yaffs_document.module
1 <?php
2
3 /**
4  * @file
5  * Contains yaffs_document.module.
6  */
7
8 use Drupal\Core\Routing\RouteMatchInterface;
9
10 /**
11  * Implements hook_help().
12  */
13 function yaffs_document_help($route_name, RouteMatchInterface $route_match) {
14   switch ($route_name) {
15     // Main module help for the yaffs_document module.
16     case 'help.page.yaffs_document':
17       $output = '';
18       $output .= '<h3>' . t('About') . '</h3>';
19       $output .= '<p>' . t('A special content type for Yaffs documents.') . '</p>';
20       return $output;
21
22     default:
23   }
24 }
25
26 /**
27  * Implements hook_theme().
28  */
29 function yaffs_document_theme() {
30   return [
31     'yaffs_document' => [
32       'template' => 'yaffs_document',
33       'render element' => 'children',
34     ],
35   ];
36
37 }
38
39 /**
40  * Implements hook_form_FORM_ID_alter().
41  */
42 function yaffs_document_form_node_papertest_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
43 /* $form['field_odt']['#ajax']['progress'] = array(
44     'callback' => 'ajax_yaffs_document_body_callback',
45     'wrapper'  => 'body-odt-div',
46     'method'   => 'replace',
47     'effect'   => 'fade',
48   );
49
50   $form['body']['#prefix'] =  '<div id="body-odt-div">';
51   $form['body']['#suffix'] =  '</div>';
52 */
53 }
54
55 function ajax_yaffs_document_body_callback($form, $form_state) {
56 /*
57   $form['body']['#default'] = 'hello';
58   return /*$form['body']; '<p>hello</p>';
59 */
60 }