Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Good practice of saving config values? #597

Closed
tim-bezhashvyly opened this issue Jun 19, 2014 · 7 comments
Closed

Good practice of saving config values? #597

tim-bezhashvyly opened this issue Jun 19, 2014 · 7 comments
Assignees

Comments

@tim-bezhashvyly
Copy link

I don't a saveConfig method used anywhere in M2 core even though the method still exists. Does it mean there's another recommended way to save config data?

@tim-bezhashvyly
Copy link
Author

Yes, right. I saw it. Just thought it's just too few across complete codebase.

So saveConfig method is still a valid option to save config?

@kandy
Copy link
Contributor

kandy commented Jun 25, 2014

If you need just save config data in storage you may use Magento\Framework\App\Config\Storage\WriterInterface.
If you need behavior as in backend you need use Magento\Backend\Model\Config

@verklov verklov self-assigned this Jun 26, 2014
@verklov
Copy link
Contributor

verklov commented Jun 26, 2014

@tim-bezhashvyly, thank you for asking! I guess @kandy has provided you an answer in the thread. Please close this issue when you are satisfied with the answers and the conversation is over. Thank you!

@tim-bezhashvyly
Copy link
Author

@kandy sorry but what do you mean by "save config data in storage" ?

@kandy
Copy link
Contributor

kandy commented Jul 1, 2014

I meant write in DB(as default behavior). It's allow you saving configuration that not available in UI for example.

@tim-bezhashvyly
Copy link
Author

Makes sense. Thanks.

magento-team pushed a commit that referenced this issue Sep 14, 2015
magento-team pushed a commit that referenced this issue May 11, 2016
[Vanilla] Bugfixes + Story
okorshenko pushed a commit that referenced this issue Dec 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants