Commit dceea533 authored by Dieter Holvoet's avatar Dieter Holvoet
Browse files

Issue #3236581 by DieterHolvoet, mohit.bansal623: Add help and configure...

Issue #3236581 by DieterHolvoet, mohit.bansal623: Add help and configure option in /admin/modules page
parent 5d0b8af5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2,4 +2,5 @@ name: 'Configuration Import - Delete Entities'
type: module
description: 'If a configuration import detects entities that need to be deleted, this module gives the option to automatically delete them.'
package: 'Other'
configure: config_import_de.settings
core: 8.x
+27 −0
Original line number Diff line number Diff line
<?php

/**
 * @file
 * General functions and hook implementations.
 */

use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
function config_import_de_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.config_import_de':
      $output = '';
      $output .= '<h3>' . t('Introduction') . '</h3>';
      $output .= '<p>' . t('Configuration management in D8 is amazing, and saves us a lot of effort. But one annoying thing is when it complains about entities that need to be deleted before a bundle/content-type/entity-type is deleted. When that happens, you cannot import any configurations until you\'ve manually deleted the aforementioned entities.') . '</p>';
      $output .= '<p>' . t('This can be a problem if this happen during an automated configuration import as part of deployment (or similar). And it can when switching between branches on a project (where each project may have an entity type not on other branches yet), and when deploying changes with systems like Jenkins.') . '</p>';
      $output .= '<p>' . t('It may also not be trivial to find the entities and delete them (depending on what type of entities they are).') . '</p>';
      $output .= '<h3>' . t('Enter this module') . '</h3>';
      $output .= '<p>' . t('This module offers the option of automatically deleting these entities when detected, allowing the import of configurations to carry on.') . '</p>';
      $output .= '<p>' . t('It also offers a "debugging" mode in which it will list the entities that will/need to be deleted (as entity type/id pairs).Both of these features can be independently enabled/disabled to fit your needs.') . '</p>';
      $output .= '<p>' . t('Both of these features can be independently enabled/disabled to fit your needs.') . '</p>';
      return $output;
  }
}