Commit 6cb450ac authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #3239580: Switch Varbase Bootstrap Paragraphs to use Entity Definition...

Issue #3239580: Switch Varbase Bootstrap Paragraphs to use Entity Definition Update Manager class from vardot/entity-definition-update-manager class library
parent 239ded44
......@@ -9,6 +9,7 @@ use Symfony\Component\Yaml\Yaml;
use Drupal\Core\Config\InstallStorage;
use Drupal\Core\Config\StorageInterface;
use Drupal\Core\Config\FileStorage;
use Vardot\Entity\EntityDefinitionUpdateManager;
/**
* Implements hook_install().
......@@ -61,11 +62,18 @@ function vbp_text_and_image_install() {
}
}
}
// ---------------------------------------------------------------------------
// Add target bundle [text and image] to landing page components
// (landing page paragraphs field) without changing old configurations.
_add_target_bundle_text_and_image_to_landing_page_components();
// 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();
}
/**
......
......@@ -9,6 +9,7 @@ use Symfony\Component\Yaml\Yaml;
use Drupal\Core\Config\InstallStorage;
use Drupal\Core\Config\StorageInterface;
use Drupal\Core\Config\FileStorage;
use Vardot\Entity\EntityDefinitionUpdateManager;
/**
* Implements hook_install().
......@@ -77,4 +78,11 @@ function varbase_bootstrap_paragraphs_install() {
$config_factory = \Drupal::configFactory()->getEditable($config_name);
$config_factory->setData($config_data)->save(TRUE);
}
// 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();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment