5 * Contains yaffs_document.module.
8 use Drupal\Core\Routing\RouteMatchInterface;
11 * Implements hook_help().
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':
18 $output .= '<h3>' . t('About') . '</h3>';
19 $output .= '<p>' . t('A special content type for Yaffs documents.') . '</p>';
27 * Implements hook_theme().
29 function yaffs_document_theme() {
32 'template' => 'yaffs_document',
33 'render element' => 'children',
40 * Implements hook_form_FORM_ID_alter().
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',
50 $form['body']['#prefix'] = '<div id="body-odt-div">';
51 $form['body']['#suffix'] = '</div>';
55 function ajax_yaffs_document_body_callback($form, $form_state) {
57 $form['body']['#default'] = 'hello';
58 return /*$form['body']; '<p>hello</p>';