Issue #2318755 by LinL, Devin Carlson, effulgentsia, catch: Block Module: Fix documentation that refers to enabling/disabling of modules

8.0.x
Jennifer Hodgdon 2014-12-02 08:50:28 -08:00
parent 4e902066df
commit 7c3071b7d2
21 changed files with 24 additions and 23 deletions

View File

@ -34,7 +34,7 @@ function block_help($route_name, RouteMatchInterface $route_match) {
$output .= '<dt>' . t('Controlling visibility') . '</dt>';
$output .= '<dd>' . t('You can control the visibility of a block by restricting it to specific pages, content types, and/or roles by setting the appropriate options under <em>Visibility settings</em> of the block configuration.') . '</dd>';
$output .= '<dt>' . t('Adding custom blocks') . '</dt>';
$output .= '<dd>' . t('You can add custom blocks, if the the <em>Custom Block</em> module is enabled on the <a href="!extend">Extend page</a>. For more information, see the <a href="!blockcontent-help">Custom Block help page</a>.', array('!extend' => \Drupal::url('system.modules_list'), '!blockcontent-help' => \Drupal::url('help.page', array('name' => 'block_content')))) . '</dd>';
$output .= '<dd>' . t('You can add custom blocks, if the <em>Custom Block</em> module is installed on the <a href="!extend">Extend page</a>. For more information, see the <a href="!blockcontent-help">Custom Block help page</a>.', array('!extend' => \Drupal::url('system.modules_list'), '!blockcontent-help' => \Drupal::url('help.page', array('name' => 'block_content')))) . '</dd>';
$output .= '</dl>';
return $output;
}
@ -108,7 +108,7 @@ function _block_rehash($theme = NULL) {
// Disable blocks in invalid regions.
if (!empty($region) && $region != BlockInterface::BLOCK_REGION_NONE && !isset($regions[$region]) && $status) {
drupal_set_message(t('The block %info was assigned to the invalid region %region and has been disabled.', array('%info' => $block_id, '%region' => $region)), 'warning');
// Disabled modules are moved into the BlockInterface::BLOCK_REGION_NONE
// Disabled blocks are moved into the BlockInterface::BLOCK_REGION_NONE
// later so no need to move the block to another region.
$block->disable()->save();
}

View File

@ -64,8 +64,9 @@ class BlockPluginCollection extends DefaultSingleLazyPluginCollection {
}
catch (PluginException $e) {
$module = $this->configuration['provider'];
// Ignore blocks belonging to disabled modules, but re-throw valid
// exceptions when the module is enabled and the plugin is misconfigured.
// Ignore blocks belonging to uninstalled modules, but re-throw valid
// exceptions when the module is installed and the plugin is
// misconfigured.
if (!$module || \Drupal::moduleHandler()->moduleExists($module)) {
throw $e;
}

View File

@ -17,7 +17,7 @@ use Drupal\simpletest\WebTestBase;
class BlockAdminThemeTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -18,7 +18,7 @@ use Drupal\simpletest\WebTestBase;
class BlockCacheTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -23,7 +23,7 @@ class BlockHiddenRegionTest extends WebTestBase {
protected $adminUser;
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -18,7 +18,7 @@ use Drupal\simpletest\WebTestBase;
class BlockHookOperationTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -17,7 +17,7 @@ use Drupal\simpletest\WebTestBase;
class BlockHtmlTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -19,7 +19,7 @@ use Drupal\block\Entity\Block;
class BlockInvalidRegionTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -19,7 +19,7 @@ use Drupal\simpletest\WebTestBase;
class BlockLanguageCacheTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -24,7 +24,7 @@ class BlockLanguageTest extends WebTestBase {
protected $adminUser;
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -17,7 +17,7 @@ use Drupal\simpletest\WebTestBase;
class BlockRenderOrderTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -22,7 +22,7 @@ use Drupal\block\BlockInterface;
class BlockStorageUnitTest extends DrupalUnitTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -15,7 +15,7 @@ namespace Drupal\block\Tests;
class BlockSystemBrandingTest extends BlockTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -17,7 +17,7 @@ use Drupal\simpletest\WebTestBase;
class BlockTemplateSuggestionsUnitTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -15,7 +15,7 @@ use Drupal\simpletest\WebTestBase;
abstract class BlockTestBase extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -17,7 +17,7 @@ use Drupal\simpletest\WebTestBase;
class BlockTitleXSSTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -17,7 +17,7 @@ use Drupal\simpletest\WebTestBase;
class BlockUiTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -23,7 +23,7 @@ use Drupal\block\Entity\Block;
class BlockViewBuilderTest extends DrupalUnitTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -17,7 +17,7 @@ use Drupal\simpletest\WebTestBase;
class NewDefaultThemeBlocksTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -17,7 +17,7 @@ use Drupal\simpletest\WebTestBase;
class NonDefaultBlockAdminTest extends WebTestBase {
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/

View File

@ -32,7 +32,7 @@ class DisplayBlockTest extends ViewTestBase {
protected $strictConfigSchema = TRUE;
/**
* Modules to enable.
* Modules to install.
*
* @var array
*/