Hei,
I wanted to handle config file values via Admin. Therefor I started to explore, if there is any way to actually use config values inside the plugin's _config.php file.
Here what I want (NOTE! using 3.4.1):
1. Change the values inside the Admin -> Settings -> NewTab
2. In plugin's _config.php file I tried to use several different ways to get config data:
* Config::inst() - print_r/var_dump gives all the values as array
* Config::inst() -> get($this -> class, "PropertyName") or $this -> config() -> get("PropertyName") - returns empty
* SiteConfig::current_site_config() or any other similar variations based on previous two - Internal Server Error
3. Reason I try this is that plugin replaces SS default action BUT it requires some data to be inserted, that MUST BE. If NOT inserted, it should stay as default ..
Used links:
* http://api.silverstripe.org/3.3/class-Config.html
* https://docs.silverstripe.org/en/3.0/topics/configuration/
* https://docs.silverstripe.org/en/3.4/developer_guides/configuration/configuration/
* https://docs.silverstripe.org/en/3.4/developer_guides/configuration/siteconfig/
Ideas anybody?