0

I have created a module which having two submodules.

  • submodule-1
  • submodule-2

Within submodule-1 I am defining multiple Views fields and filters based on a custom entity type.

Within submodule-2 I am having the exported configuration of a View which is using those fields and filters from submodule-1.

When I uninstall submodule-2 I want to ensure that the View is also getting removed from the active configuration.

While exporting the view from the active configuration to the file system the dependencies of it does contain submodule-1 but not submodule-2. I have tried to manually add the dependency to submodule-2 within the View configuration file, but when the module is getting installed, the dependency is simply being removed. I figured this out by checking the active configuration for the View.

I know that I can just use a hook_uninstall() and delete the view configuration, but this is not the way this should work.

Is someone having an idea how I can tell my View that it is dependent on submodule-2?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.