OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – How do I? Questions How do I change default configuration value in another bundle?

This topic contains 2 replies, has 2 voices, and was last updated by  Brad Harrison 5 years, 10 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #29694

    Brad Harrison
    Participant

    I’m trying to change the default Localization > Temperature Unit system value when I add a custom bundle. This is so this and other settings do not need to be manually changed whenever a new application is installed.

    I’ve determined that the default value is being set within the Oro\Bundle\LocaleBundle\DependencyInjection\Configuration class:

    I’ve tried adding an override within my bundle hoping that it will be merged over the top:

    My bundle is being loaded after the OroLocaleBundle but I’m still seeing fahrenheit as the default value:

    Is there something I’m missing or is this not possible?

    Cheers.

    Brad

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #29696

    Andrey Yatsenko
    Moderator

    This is not a good practice to change default configuration value from another bundle.

    But you still can change configuration value from another bundle in data fixtures with $config->set('... so after installation value will be already defined.

    #29697

    Brad Harrison
    Participant

    Thanks Andrey.

    I agree that it isn’t good practice but it’s a requirement to reduce implementation time. I guess that if we need to change the settings I can use a versioned data fixture to smartly make the change again.

Viewing 2 replies - 1 through 2 (of 2 total)

The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.

Back to top