Skip to content
Snippets Groups Projects
Commit 34e270ff authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #3400136: Refactor updates for Varbase Core by moving hook updates to...

Issue #3400136: Refactor updates for Varbase Core by moving hook updates to include/updates with load Include based on major branches
parent 40f9b37b
No related branches found
Tags 9.1.11
2 merge requests!51Fix phpcs issues,!40Issue #3392444: Revamp the 9.1.x branch for Varbase Core to work with Drupal...
Showing
with 0 additions and 103 deletions
......@@ -7,4 +7,3 @@
\Drupal::moduleHandler()->loadInclude('varbase_core', 'inc', 'include/updates/v8');
\Drupal::moduleHandler()->loadInclude('varbase_core', 'inc', 'include/updates/v9');
\Drupal::moduleHandler()->loadInclude('varbase_core', 'inc', 'include/updates/v10');
<?php
/**
* @file
* Contains varbase_core_update_10###(s) hook updates.
*/
/**
* Issue #3399650: Add Config ignore for Import/Export.
*
* Dynamic Responsive Image (drimage) generated image styles.
*/
function varbase_core_update_100001() {
if (\Drupal::moduleHandler()->moduleExists('drimage')
&& \Drupal::moduleHandler()->moduleExists('config_ignore')) {
$config_factory = \Drupal::configFactory()->getEditable('config_ignore.settings');
$mode = $config_factory->get('mode');
if (!isset($mode)) {
$config_factory->set('mode', 'simple');
}
$ignored_config_entities = $config_factory->get('ignored_config_entities');
if (isset($ignored_config_entities)) {
$ignored_config_entities[] = 'image.style.drimage_*';
$config_factory->set('ignored_config_entities', $ignored_config_entities);
}
$config_factory->save(TRUE);
}
}
......@@ -7,4 +7,3 @@
\Drupal::moduleHandler()->loadInclude('varbase_admin', 'inc', 'include/updates/v8');
\Drupal::moduleHandler()->loadInclude('varbase_admin', 'inc', 'include/updates/v9');
\Drupal::moduleHandler()->loadInclude('varbase_admin', 'inc', 'include/updates/v10');
<?php
/**
* @file
* Contains varbase_admin_update_10###(s) hook updates.
*/
use Vardot\Entity\EntityDefinitionUpdateManager;
use Vardot\Installer\ModuleInstallerFactory;
/**
* Issue #3398817: Add Views Date Filter ~1.0.0 module.
*
* Enable it and change default configs for Date Filters.
*/
function varbase_admin_update_100001() {
if (!\Drupal::moduleHandler()->moduleExists('date_filter')) {
\Drupal::service('module_installer')->install(['date_filter'], FALSE);
$managed_configs = [
'views.view.content',
'views.view.user_admin_people',
];
ModuleInstallerFactory::importConfigsFromList('varbase_admin', $managed_configs, 'config/optional');
// Entity updates to clear up any mismatched entity and/or field definitions
// And Fix changes were detected in the entity type and field definitions.
\Drupal::classResolver()
->getInstanceFromDefinition(EntityDefinitionUpdateManager::class)
->applyUpdates();
}
}
......@@ -7,4 +7,3 @@
\Drupal::moduleHandler()->loadInclude('varbase_internationalization', 'inc', 'include/updates/v8');
\Drupal::moduleHandler()->loadInclude('varbase_internationalization', 'inc', 'include/updates/v9');
\Drupal::moduleHandler()->loadInclude('varbase_internationalization', 'inc', 'include/updates/v10');
<?php
/**
* @file
* Contains varbase_internationalization_update_10###(s) hook updates.
*/
......@@ -6,4 +6,3 @@
*/
\Drupal::moduleHandler()->loadInclude('varbase_page', 'inc', 'include/updates/v9');
\Drupal::moduleHandler()->loadInclude('varbase_page', 'inc', 'include/updates/v10');
<?php
/**
* @file
* Contains varbase_page_update_10###(s) hook updates.
*/
......@@ -6,4 +6,3 @@
*/
\Drupal::moduleHandler()->loadInclude('varbase_security', 'inc', 'include/updates/v9');
\Drupal::moduleHandler()->loadInclude('varbase_security', 'inc', 'include/updates/v10');
<?php
/**
* @file
* Contains varbase_security_update_10###(s) hook updates.
*/
......@@ -6,4 +6,3 @@
*/
\Drupal::moduleHandler()->loadInclude('varbase_tour', 'inc', 'include/updates/v9');
\Drupal::moduleHandler()->loadInclude('varbase_tour', 'inc', 'include/updates/v10');
<?php
/**
* @file
* Contains varbase_tour_update_10###(s) hook updates.
*/
......@@ -7,4 +7,3 @@
\Drupal::moduleHandler()->loadInclude('varbase_webform', 'inc', 'include/updates/v8');
\Drupal::moduleHandler()->loadInclude('varbase_webform', 'inc', 'include/updates/v9');
\Drupal::moduleHandler()->loadInclude('varbase_webform', 'inc', 'include/updates/v10');
<?php
/**
* @file
* Contains varbase_webform_update_10###(s) hook updates.
*/
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