Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663

This commit is contained in:
Greg Anderson 2015-10-08 11:40:12 -07:00
parent eb34d130a8
commit f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions

View file

@ -47,7 +47,7 @@ function hook_help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_
switch ($route_name) {
// Main module help for the block module.
case 'help.page.block':
return '<p>' . t('Blocks are boxes of content rendered into an area, or region, of a web page. The default theme Bartik, for example, implements the regions "Sidebar first", "Sidebar second", "Featured", "Content", "Header", "Footer", etc., and a block may appear in any one of these areas. The <a href="!blocks">blocks administration page</a> provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions.', array('!blocks' => \Drupal::url('block.admin_display'))) . '</p>';
return '<p>' . t('Blocks are boxes of content rendered into an area, or region, of a web page. The default theme Bartik, for example, implements the regions "Sidebar first", "Sidebar second", "Featured", "Content", "Header", "Footer", etc., and a block may appear in any one of these areas. The <a href=":blocks">blocks administration page</a> provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions.', array(':blocks' => \Drupal::url('block.admin_display'))) . '</p>';
// Help for another path in the block module.
case 'block.admin_display':

View file

@ -17,27 +17,27 @@ function help_help($route_name, RouteMatchInterface $route_match) {
$output = '<h2>' . t('Getting Started') . '</h2>';
$output .= '<p>' . t('Follow these steps to set up and start using your website:') . '</p>';
$output .= '<ol>';
$output .= '<li>' . t('<strong>Configure your website</strong> Once logged in, visit the <a href="!admin">Administration page</a>, where you may <a href="!config">customize and configure</a> all aspects of your website.', array('!admin' => \Drupal::url('system.admin'), '!config' => \Drupal::url('system.admin_config'))) . '</li>';
$output .= '<li>' . t('<strong>Enable additional functionality</strong> Next, visit the <a href="!modules">Extend page</a> and enable modules that suit your specific needs. You can find additional modules at the <a href="!download_modules">Drupal.org modules page</a>.', array('!modules' => \Drupal::url('system.modules_list'), '!download_modules' => 'https://www.drupal.org/project/modules')) . '</li>';
$output .= '<li>' . t('<strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href="!themes">Appearance page</a>. You may choose from one of the included themes or download additional themes from the <a href="!download_themes">Drupal.org themes page</a>.', array('!themes' => \Drupal::url('system.themes_page'), '!download_themes' => 'https://www.drupal.org/project/themes')) . '</li>';
$output .= '<li>' . t('<strong>Configure your website</strong> Once logged in, visit the <a href=":admin">Administration page</a>, where you may <a href=":config">customize and configure</a> all aspects of your website.', array(':admin' => \Drupal::url('system.admin'), ':config' => \Drupal::url('system.admin_config'))) . '</li>';
$output .= '<li>' . t('<strong>Enable additional functionality</strong> Next, visit the <a href=":modules">Extend page</a> and enable modules that suit your specific needs. You can find additional modules at the <a href=":download_modules">Drupal.org modules page</a>.', array(':modules' => \Drupal::url('system.modules_list'), ':download_modules' => 'https://www.drupal.org/project/modules')) . '</li>';
$output .= '<li>' . t('<strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href=":themes">Appearance page</a>. You may choose from one of the included themes or download additional themes from the <a href=":download_themes">Drupal.org themes page</a>.', array(':themes' => \Drupal::url('system.themes_page'), ':download_themes' => 'https://www.drupal.org/project/themes')) . '</li>';
// Display a link to the create content page if Node module is enabled.
if (\Drupal::moduleHandler()->moduleExists('node')) {
$output .= '<li>' . t('<strong>Start posting content</strong> Finally, you may <a href="!content">add new content</a> to your website.', array('!content' => \Drupal::url('node.add_page'))) . '</li>';
$output .= '<li>' . t('<strong>Start posting content</strong> Finally, you may <a href=":content">add new content</a> to your website.', array(':content' => \Drupal::url('node.add_page'))) . '</li>';
}
$output .= '</ol>';
$output .= '<p>' . t('For more information, refer to the subjects listed in the Help Topics section or to the <a href="!docs">online documentation</a> and <a href="!support">support</a> pages at <a href="!drupal">drupal.org</a>.', array('!docs' => 'https://www.drupal.org/documentation', '!support' => 'https://www.drupal.org/support', '!drupal' => 'https://www.drupal.org')) . '</p>';
$output .= '<p>' . t('For more information, refer to the subjects listed in the Help Topics section or to the <a href=":docs">online documentation</a> and <a href=":support">support</a> pages at <a href=":drupal">drupal.org</a>.', array(':docs' => 'https://www.drupal.org/documentation', ':support' => 'https://www.drupal.org/support', ':drupal' => 'https://www.drupal.org')) . '</p>';
return $output;
case 'help.page.help':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Help module generates <a href="!help-page">Help reference pages</a> to guide you through the use and configuration of modules, and provides a Help block with page-level help. The reference pages are a starting point for <a href="!handbook">Drupal.org online documentation</a> pages that contain more extensive and up-to-date information, are annotated with user-contributed comments, and serve as the definitive reference point for all Drupal documentation. For more information, see the <a href="!help">online documentation for the Help module</a>.', array('!help' => 'https://www.drupal.org/documentation/modules/help/', '!handbook' => 'https://www.drupal.org/documentation', '!help-page' => \Drupal::url('help.main'))) . '</p>';
$output .= '<p>' . t('The Help module generates <a href=":help-page">Help reference pages</a> to guide you through the use and configuration of modules, and provides a Help block with page-level help. The reference pages are a starting point for <a href=":handbook">Drupal.org online documentation</a> pages that contain more extensive and up-to-date information, are annotated with user-contributed comments, and serve as the definitive reference point for all Drupal documentation. For more information, see the <a href=":help">online documentation for the Help module</a>.', array(':help' => 'https://www.drupal.org/documentation/modules/help/', ':handbook' => 'https://www.drupal.org/documentation', ':help-page' => \Drupal::url('help.main'))) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Providing a help reference') . '</dt>';
$output .= '<dd>' . t('The Help module displays explanations for using each module listed on the main <a href="!help">Help reference page</a>.', array('!help' => \Drupal::url('help.main'))) . '</dd>';
$output .= '<dd>' . t('The Help module displays explanations for using each module listed on the main <a href=":help">Help reference page</a>.', array(':help' => \Drupal::url('help.main'))) . '</dd>';
$output .= '<dt>' . t('Providing page-specific help') . '</dt>';
$output .= '<dd>' . t('Page-specific help text provided by modules is displayed in the Help block. This block can be placed and configured on the <a href="!blocks">Block layout page</a>.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '</dd>';
$output .= '<dd>' . t('Page-specific help text provided by modules is displayed in the Help block. This block can be placed and configured on the <a href=":blocks">Block layout page</a>.', array(':blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#')) . '</dd>';
$output .= '</dl>';
return $output;
}

View file

@ -77,7 +77,7 @@ class HelpController extends ControllerBase {
$column = array(
'#type' => 'container',
'links' => array('#theme' => 'item_list'),
'#attributes' => array('class' => array('layout-column', 'quarter')),
'#attributes' => array('class' => array('layout-column', 'layout-column--quarter')),
);
$output = array(
'#prefix' => '<div class="clearfix">',

View file

@ -67,7 +67,7 @@ class HelpTest extends WebTestBase {
// Verify that introductory help text exists, goes for 100% module coverage.
$this->drupalLogin($this->adminUser);
$this->drupalGet('admin/help');
$this->assertRaw(t('For more information, refer to the subjects listed in the Help Topics section or to the <a href="!docs">online documentation</a> and <a href="!support">support</a> pages at <a href="!drupal">drupal.org</a>.', array('!docs' => 'https://www.drupal.org/documentation', '!support' => 'https://www.drupal.org/support', '!drupal' => 'https://www.drupal.org')), 'Help intro text correctly appears.');
$this->assertRaw(t('For more information, refer to the subjects listed in the Help Topics section or to the <a href=":docs">online documentation</a> and <a href=":support">support</a> pages at <a href=":drupal">drupal.org</a>.', array(':docs' => 'https://www.drupal.org/documentation', ':support' => 'https://www.drupal.org/support', ':drupal' => 'https://www.drupal.org')), 'Help intro text correctly appears.');
// Verify that help topics text appears.
$this->assertRaw('<h2>' . t('Help topics') . '</h2><p>' . t('Help is available on the following items:') . '</p>', 'Help topics text correctly appears.');
@ -105,14 +105,24 @@ class HelpTest extends WebTestBase {
$this->assertResponse($response);
if ($response == 200) {
$this->assertTitle($name . ' | Drupal', format_string('%module title was displayed', array('%module' => $module)));
$this->assertRaw('<h1 class="page-title">' . t($name) . '</h1>', format_string('%module heading was displayed', array('%module' => $module)));
$this->assertEqual($this->cssSelect('h1.page-title')[0], t($name), format_string('%module heading was displayed', array('%module' => $module)));
$admin_tasks = system_get_module_admin_tasks($module, system_get_info('module', $module));
if (!empty($admin_tasks)) {
$this->assertText(t('@module administration pages', array('@module' => $name)));
}
foreach ($admin_tasks as $task) {
$this->assertLink($task['title']);
// Ensure there are no double escaped '&' or '<' characters.
$this->assertNoEscaped('&amp;', 'The help text does not have double escaped &amp;.');
$this->assertNoEscaped('&lt;', 'The help text does not have double escaped &lt;.');
// Ensure there are no escaped '<' characters.
$this->assertNoEscaped('<', 'The help text does not have single escaped &lt;.');
}
// Ensure there are no double escaped '&' or '<' characters.
$this->assertNoEscaped('&amp;');
$this->assertNoEscaped('&lt;');
// Ensure there are no escaped '<' characters.
$this->assertNoEscaped('<');
}
}
}

View file

@ -36,13 +36,6 @@ class SupernovaGenerator implements UrlGeneratorInterface {
throw new \Exception();
}
/**
* {@inheritdoc}
*/
public function generateFromPath($path = NULL, $options = array(), $collect_bubbleable_metadata = FALSE) {
throw new \Exception();
}
/**
* {@inheritdoc}
*/