Skip to content
Snippets Groups Projects
Commit e2ec01cd authored by Junaid's avatar Junaid
Browse files

Disable Export in batch button from the config_batch_export module as it is...

Disable Export in batch button from the config_batch_export module as it is not compatible with this module.
parent f8422b9b
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
use Drupal\Core\StreamWrapper\StreamWrapperManager; use Drupal\Core\StreamWrapper\StreamWrapperManager;
use Drupal\config_features\Controller\ConfigBatchExportController; use Drupal\config_features\Controller\ConfigBatchExportController;
use Drupal\Core\Form\FormStateInterface;
/** /**
* Implements hook_file_download(). * Implements hook_file_download().
...@@ -24,3 +25,13 @@ function config_features_file_download($uri) { ...@@ -24,3 +25,13 @@ function config_features_file_download($uri) {
return -1; return -1;
} }
} }
/**
* Implements hook_form_FORM_ID_alter().
*/
function config_features_form_config_export_form_alter(&$form, FormStateInterface $form_state) {
if (\Drupal::moduleHandler()->moduleExists('config_batch_export')) {
\Drupal::messenger()->addWarning(t('Export in batch does not work with configuration features, thus disabled.'));
$form['export-batch']['#disabled'] = TRUE;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment