context_omega_test.module in Context omega 7
The main module file for the context_omega_test module.
File
tests/context_omega_test/context_omega_test.moduleView source
<?php
/**
* @file
* The main module file for the context_omega_test module.
*/
/**
* Implements hook_menu().
*/
function context_omega_test_menu() {
$items['custom-omega-test'] = array(
'title' => 'Custom omega test',
'description' => 'Defines the omega test page.',
'page callback' => 'context_omega_test_page',
'access callback' => TRUE,
);
return $items;
}
/**
* Page callback of the test page.
*/
function context_omega_test_page() {
// Just return an empty page.
return array(
'#markup' => 'demo page',
);
}
/**
* Implements hook_ctools_plugin_api().
*/
function context_omega_test_ctools_plugin_api($module = NULL, $api = NULL) {
if ($module == 'context' && $api == 'context') {
return array(
'version' => "3",
);
}
}
/**
* Implements hook_block_info().
*/
function context_omega_test_block_info() {
return array(
'custom_block' => array(
'info' => t('Custom block'),
),
);
}
/**
* Implements hook_block_view().
*/
function context_omega_test_block_view($delta = '') {
$block = array();
if ($delta == 'custom_block') {
$block['subject'] = 'Omega Test Block';
$block['content'] = 'The content of the block';
}
return $block;
}
Functions
Name | Description |
---|---|
context_omega_test_block_info | Implements hook_block_info(). |
context_omega_test_block_view | Implements hook_block_view(). |
context_omega_test_ctools_plugin_api | Implements hook_ctools_plugin_api(). |
context_omega_test_menu | Implements hook_menu(). |
context_omega_test_page | Page callback of the test page. |