test_page_test.module 649 Bytes
Newer Older
1 2 3 4 5 6 7 8
<?php

/**
 * Implements hook_menu().
 */
function test_page_test_menu() {
  $items['test-page'] = array(
    'title' => 'Test front page',
9
    'route_name' => 'test_page_test.test_page',
10 11 12 13 14 15 16 17
  );

  return $items;
}

/**
 * Page callback: Returns a test page and sets the title.
 *
18
 * @deprecated Use \Drupal\test_page_test\Controller\TestPageTestController::testPage()
19 20
 */
function test_page_test_page() {
21 22 23 24
  $attached['js'][] = array(
    'data' => array('test-setting' => 'azAZ09();.,\\\/-_{}'),
    'type' => 'setting',
  );
25 26 27
  return array(
    '#title' => t('Test page'),
    '#markup' => t('Test page text.'),
28
    '#attached' => $attached,
29
  );
30
}