Skip to content
Snippets Groups Projects
Commit 780adf87 authored by Joshua Sedler's avatar Joshua Sedler :cartwheel_tone2:
Browse files

Issue #3349668: Tiny fix summary

parent 5bc38b34
No related branches found
No related tags found
1 merge request!5Issue #3349668: Tiny fix summary
# Layout Disable
The Layout Disable module provides an admin UI to disable unwanted layouts.
For a full description of the module, visit the
[project page](https://www.drupal.org/project/layout_disable).
Submit bug reports and feature suggestions, or track changes in the
[issue queue](https://www.drupal.org/project/issues/layout_disable).
## Table of contents
- Requirements
- Installation
- Configuration
- Maintainers
## Requirements
No special requirements.
## Installation
Install as you would normally install a contributed Drupal module. For further
information, see
[Installing Drupal Modules](https://www.drupal.org/docs/extending-drupal/installing-drupal-modules).
## Configuration
1. Enable the module from extend.
2. Go to configuration -> User Interfce -> Disable layouts,and select the layout you wish to disable.
## Maintainers
- Julian Pustkuchen - [Anybody](https://www.drupal.org/u/anybody)
- Thomas Frobieter - [thomas.frobieter](https://www.drupal.org/u/thomasfrobieter)
- Joshua Sedler - [Grevil](https://www.drupal.org/u/grevil)
The Layout Disable module provides an admin UI to disable unwanted layouts.
...@@ -2,6 +2,7 @@ name: 'Layout Disable' ...@@ -2,6 +2,7 @@ name: 'Layout Disable'
type: module type: module
description: Provides an user interface to disable unwanted core or contrib layouts. description: Provides an user interface to disable unwanted core or contrib layouts.
core_version_requirement: ^8.8 || ^9 || ^10 core_version_requirement: ^8.8 || ^9 || ^10
configure: layout_disable
package: Layout package: Layout
dependencies: dependencies:
- drupal:layout_discovery - drupal:layout_discovery
...@@ -13,6 +13,6 @@ function layout_disable_update_8001() { ...@@ -13,6 +13,6 @@ function layout_disable_update_8001() {
$config = $config_factory->getEditable('layout_disable.settings'); $config = $config_factory->getEditable('layout_disable.settings');
$oldSettings = $config->get('layout_disable.settings.disabled_layouts'); $oldSettings = $config->get('layout_disable.settings.disabled_layouts');
$config->set('disabled_layouts', $oldSettings) $config->set('disabled_layouts', $oldSettings)
->clear('layout_disable') ->clear('layout_disable')
->save(); ->save();
} }
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
* The layout disable module file. * The layout disable module file.
*/ */
use Drupal\Core\Routing\RouteMatchInterface;
/** /**
* Implements hook_layout_alter(). * Implements hook_layout_alter().
*/ */
...@@ -19,3 +21,22 @@ function layout_disable_layout_alter(&$definitions) { ...@@ -19,3 +21,22 @@ function layout_disable_layout_alter(&$definitions) {
} }
} }
} }
/**
* Implements hook_help().
*/
function layout_disable_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the layout_disable module.
case 'help.page.layout_disable':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Provides an admin UI (admin/config/user-interface/layout-disable)
to disable unwanted core or contrib layouts.') . '</p>';
$output .= '<p>' . t('Use case: You want to make certain layouts, e.g. added by core,
themes or modules unavailable to user selection / usage.') . '</p>';
$output .= '<p>' . t('After you disabled a layout it no longer appears in layout
listings.') . '</p>';
return $output;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment