22415 Posts in 6927 Topics by 2750 members
|Go to End|
3 August 2013 at 2:31am
I know extensions should be set in yaml like this:
But is there a way to replace an extension with another one or remove it in yaml as well? or do we need to go back to the old _config.php and do:
And if not - could some 'remove-extension' key be added, and then use before/after to force some extensions to not be loaded?
5 August 2013 at 11:34am Last edited: 5 August 2013 11:37am
The config system is designed to not include values in certain circumstances, e.g. if you check the docs on config it mentions the use of "Only", "classexists", "moduleexists" etc, which might work for you.
Unit tests still in the core use remove_extension() so that's probably alright to use for the time being, e.g. Member::remove_extension('MyMemberExtension') for 3.1 syntax, and Object::remove_extension('Member', 'MyMemberExtension') for 3.0 syntax. You can also manipulate the Config class directly, e.g. Config::inst()->remove('Member', 'extensions', Config::anything(), 'MyMemberExtension')
If this function gets deprecated that'll be a later release of the framework.
7 August 2013 at 11:17pm
Thanks Sean, I'll read the docs again - I'm getting better at working YAML, but it still doen't come naturally somehow
|Go to Top|