ajax_loader_test.module in Ajax loader 7
Contains general functionality and hooks.
File
modules/ajax_loader_test/ajax_loader_test.moduleView source
<?php
/**
* @file
* Contains general functionality and hooks.
*/
/**
* Implements hook_menu().
*/
function ajax_loader_test_menu() {
$items['ajax-loader/test'] = array(
'title' => 'Ajax loader test',
'page callback' => '_ajax_loader_test_page',
'access arguments' => array(
'administer ajax loader',
),
);
return $items;
}
/**
* This page only exists for testing purposes.
*/
function _ajax_loader_test_page() {
drupal_add_library('system', 'drupal.ajax');
return array(
'#theme' => 'link',
'#text' => 'My link',
'#path' => url('/my/path'),
'#options' => array(
'html' => FALSE,
'attributes' => array(
'class' => array(
'use-ajax',
),
),
),
);
}
Functions
Name | Description |
---|---|
ajax_loader_test_menu | Implements hook_menu(). |
_ajax_loader_test_page | This page only exists for testing purposes. |