You are here

function config_split_help in Configuration Split 2.0.x

Same name and namespace in other branches
  1. 8 config_split.module \config_split_help()

Implements hook_help().

File

./config_split.module, line 51
Configuration split module functions.

Code

function config_split_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.config_split':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('
The Drupal 8 configuration management works best when importing and exporting
the whole set of the sites configuration. However, sometimes developers like to
opt out of the robustness of CM and have a super-set of configuration active on
their development machine. The canonical example for this is to have the
<code>devel</code> module enabled or having a few block placements or views in
the development environment and then not export them into the set of
configuration to be deployed, yet still being able to share the development
configuration with colleagues.

This module allows to define sets of configuration that will get exported to
separate directories when exporting, and get merged together when importing.
It is possible to define in settings.php which of these sets should be active
and considered for the export and import.

For more information, see the <a href=":online-documentation">online documentation for the Config Split module</a>.', [
        ':online-documentation' => 'https://www.drupal.org/docs/8/modules/configuration-split',
      ]) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Setting up a split') . '</dt>';
      $output .= '<dd>' . t('
Let us assume that you configured your sync directory as follows:
<code>
$settings["config_sync_directory"] = \'../config/sync\';
</code>
Create a split with the folder `../config/my-split-folder` and create that
directory. Now add a module that is currently active that you wish not to
export, say `devel`. Next export all the configuration.
This should have removed devel from `core.extensions` and moved the devel
configuration to the split folder.') . '</dd>';
      $output .= '<dt>' . t('Deploy splits') . '</dt>';
      $output .= '<dd>' . t('
Now deploy the configuration and devel will be un-installed.
On another developers machine just import the configuration, add the override,
clear the cache, and import again to have devel enabled on that environment.

You should only edit active splits as inactive splits will not take effect when
exporting the configuration.') . '</dd>';
      $output .= '</dl>';
      return $output;
    case 'entity.config_split.add_form':
    case 'entity.config_split.edit_form':
      $output = '';
      $output .= '<p>' . t('Config Split Help') . '</p>';
      $output .= '<p>' . t('The configuration listed as part of a split
      are exported to the split storage rather than the usual sync directory
      when exporting the whole configuration. When importing the whole
      configuration, the configuration in the split storages is merged with
      the default sync directory and overrides the configuration.
      The configuration does not end up being overwritten in the sense of
      configuration overrides such as the overrides from settings.php.') . '</p>';
      return $output;
  }
  return NULL;
}