1 |
7295e063
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Provides Media Ckeditor module pages for testing purposes.
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
/**
|
9 |
|
|
* Implements hook_media_ckeditor_info().
|
10 |
|
|
*/
|
11 |
|
|
function media_ckeditor_test_info() {
|
12 |
|
|
// Allow tests to enable or disable this hook.
|
13 |
|
|
if (!variable_get('media_ckeditor_test_info', FALSE)) {
|
14 |
|
|
return array();
|
15 |
|
|
}
|
16 |
|
|
|
17 |
|
|
$info['media_ckeditor_test'] = array(
|
18 |
|
|
'title' => t('Media Ckeditor module test'),
|
19 |
|
|
'class' => 'MediaModuleTest',
|
20 |
|
|
'weight' => 50,
|
21 |
|
|
);
|
22 |
|
|
|
23 |
|
|
return $info;
|
24 |
|
|
}
|
25 |
|
|
|
26 |
|
|
/**
|
27 |
|
|
* Implements hook_media_ckeditor_info_alter().
|
28 |
|
|
*/
|
29 |
|
|
function media_ckeditor_test_info_alter(&$info) {
|
30 |
|
|
// Allow tests to enable or disable this hook.
|
31 |
|
|
if (!variable_get('media_ckeditor_test_info_alter', FALSE)) {
|
32 |
|
|
return;
|
33 |
|
|
}
|
34 |
|
|
|
35 |
|
|
$info['media_ckeditor_test']['title'] = t('Altered test title');
|
36 |
|
|
}
|
37 |
|
|
|
38 |
|
|
/**
|
39 |
|
|
* Implements hook_menu().
|
40 |
|
|
*/
|
41 |
|
|
function media_ckeditor_test_menu() {
|
42 |
|
|
$items = array();
|
43 |
|
|
|
44 |
|
|
$items['media_ckeditor/test'] = array(
|
45 |
|
|
'title' => 'Media Ckeditor test',
|
46 |
|
|
'page callback' => 'drupal_get_form',
|
47 |
|
|
'page arguments' => array('media_ckeditor_test_form'),
|
48 |
|
|
'access arguments' => array('view files'),
|
49 |
|
|
);
|
50 |
|
|
|
51 |
|
|
return $items;
|
52 |
|
|
} |