Hi guys, just wanting to congratulate you on the great job so far, and I only have just one question related to DataObject extensions :
I am currently developing a module which requires quite a lot of tables (15 or more) and I thought that Extending DataObject would be the best way to do it so I went on and defined my classes in the modules _config.php, now, is that the best way to do it because this Undefined index error in sapphire/core/ClassInfo.php (ancestry) keep popping up when least expected and I`m really out of ideas. Any help would be greatly appreciated.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Hi imihai,
You have to register your extensions and the best place is - from my current point of view - in the _config.php.
I gained the experiences, that creating the extension classes and insert the extension-registration in the _config.php in one step does not work. I found a solution with commenting the registration entries in _config.php and run a db/build?flush=1, uncommenting and run a db/build again. I did not find any reason for the steps, but it works.
Best regards,
chrclaus
No luck there :( ,
No, _config.php is for module configuration and acts as a flag to tell SilverStripe that a module extists at this location.
Put your class files in the 'code' subdirectory under _config.php.
See Creating Modules in the wiki.