3093 Posts in 875 Topics by 654 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1049 Views |
-
Extending DataObject

12 August 2009 at 6:32pm Last edited: 12 August 2009 6:32pm
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. -
Re: Extending DataObject

12 August 2009 at 8:15pm
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 -
Re: Extending DataObject

13 August 2009 at 9:58am
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.
| 1049 Views | ||
|
Page:
1
|
Go to Top |

,
