First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
12
modules/block/tests/block_test.info
Normal file
12
modules/block/tests/block_test.info
Normal file
|
@ -0,0 +1,12 @@
|
|||
name = Block test
|
||||
description = Provides test blocks.
|
||||
package = Testing
|
||||
version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by Drupal.org packaging script on 2017-06-21
|
||||
version = "7.56"
|
||||
project = "drupal"
|
||||
datestamp = "1498069849"
|
||||
|
67
modules/block/tests/block_test.module
Normal file
67
modules/block/tests/block_test.module
Normal file
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Provide test blocks.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_system_theme_info().
|
||||
*/
|
||||
function block_test_system_theme_info() {
|
||||
$themes['block_test_theme'] = drupal_get_path('module', 'block_test') . '/themes/block_test_theme/block_test_theme.info';
|
||||
return $themes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function block_test_block_info() {
|
||||
$blocks['test_cache'] = array(
|
||||
'info' => t('Test block caching'),
|
||||
'cache' => variable_get('block_test_caching', DRUPAL_CACHE_PER_ROLE),
|
||||
);
|
||||
|
||||
$blocks['test_underscore'] = array(
|
||||
'info' => t('Test underscore'),
|
||||
);
|
||||
|
||||
$blocks['test-hyphen'] = array(
|
||||
'info' => t('Test hyphen'),
|
||||
);
|
||||
|
||||
$blocks['test_html_id'] = array(
|
||||
'info' => t('Test block html id'),
|
||||
);
|
||||
return $blocks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_block_view().
|
||||
*/
|
||||
function block_test_block_view($delta = 0) {
|
||||
return array('content' => variable_get('block_test_content', ''));
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_block_view_MODULE_DELTA_alter().
|
||||
*/
|
||||
function block_test_block_view_block_test_test_underscore_alter(&$data, $block) {
|
||||
$data['content'] = 'hook_block_view_MODULE_DELTA_alter';
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_block_view_MODULE_DELTA_alter().
|
||||
*/
|
||||
function block_test_block_view_block_test_test_hyphen_alter(&$data, $block) {
|
||||
$data['content'] = 'hook_block_view_MODULE_DELTA_alter';
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_block_info_alter().
|
||||
*/
|
||||
function block_test_block_info_alter(&$blocks) {
|
||||
if (variable_get('block_test_info_alter')) {
|
||||
$blocks['block_test']['test_html_id']['weight'] = 10000;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
name = Block test theme
|
||||
description = Theme for testing the block system
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
regions[sidebar_first] = Left sidebar
|
||||
regions_hidden[] = sidebar_first
|
||||
regions[sidebar_second] = Right sidebar
|
||||
regions_hidden[] = sidebar_second
|
||||
regions[content] = Content
|
||||
regions[header] = Header
|
||||
regions[footer] = Footer
|
||||
regions[highlighted] = Highlighted
|
||||
regions[help] = Help
|
||||
|
||||
; Information added by Drupal.org packaging script on 2017-06-21
|
||||
version = "7.56"
|
||||
project = "drupal"
|
||||
datestamp = "1498069849"
|
||||
|
78
modules/block/tests/themes/block_test_theme/page.tpl.php
Normal file
78
modules/block/tests/themes/block_test_theme/page.tpl.php
Normal file
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Custom theme implementation to display a single Drupal page without
|
||||
* sidebars. The sidebars are hidden by regions_hidden for this theme, so
|
||||
* the default page.tpl.php will not work without throwing exceptions.
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="page-wrapper"><div id="page">
|
||||
|
||||
<div id="header"><div class="section clearfix">
|
||||
|
||||
<?php if ($logo): ?>
|
||||
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
|
||||
<img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($site_name || $site_slogan): ?>
|
||||
<div id="name-and-slogan">
|
||||
<?php if ($site_name): ?>
|
||||
<?php if ($title): ?>
|
||||
<div id="site-name"><strong>
|
||||
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
|
||||
</strong></div>
|
||||
<?php else: /* Use h1 when the content title is empty */ ?>
|
||||
<h1 id="site-name">
|
||||
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($site_slogan): ?>
|
||||
<div id="site-slogan"><?php print $site_slogan; ?></div>
|
||||
<?php endif; ?>
|
||||
</div> <!-- /#name-and-slogan -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php print render($page['header']); ?>
|
||||
|
||||
</div></div> <!-- /.section, /#header -->
|
||||
|
||||
<?php if ($main_menu || $secondary_menu): ?>
|
||||
<div id="navigation"><div class="section">
|
||||
<?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => t('Main menu'))); ?>
|
||||
<?php print theme('links__system_secondary_menu', array('links' => $secondary_menu, 'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => t('Secondary menu'))); ?>
|
||||
</div></div> <!-- /.section, /#navigation -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($breadcrumb): ?>
|
||||
<div id="breadcrumb"><?php print $breadcrumb; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php print $messages; ?>
|
||||
|
||||
<div id="main-wrapper"><div id="main" class="clearfix">
|
||||
|
||||
<div id="content" class="column"><div class="section">
|
||||
<?php if ($page['highlighted']): ?><div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?>
|
||||
<a id="main-content"></a>
|
||||
<?php print render($title_prefix); ?>
|
||||
<?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
|
||||
<?php print render($title_suffix); ?>
|
||||
<?php if ($tabs = render($tabs)): ?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?>
|
||||
<?php print render($page['help']); ?>
|
||||
<?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
|
||||
<?php print render($page['content']); ?>
|
||||
<?php print $feed_icons; ?>
|
||||
</div></div> <!-- /.section, /#content -->
|
||||
</div></div> <!-- /#main, /#main-wrapper -->
|
||||
|
||||
<div id="footer"><div class="section">
|
||||
<?php print render($page['footer']); ?>
|
||||
</div></div> <!-- /.section, /#footer -->
|
||||
|
||||
</div></div> <!-- /#page, /#page-wrapper -->
|
Loading…
Add table
Add a link
Reference in a new issue