Jump to:

3460 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » RestfulServer and custom classes?

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1256 Views
  • Mange
    Community Member
    3 Posts

    RestfulServer and custom classes? Link to this post


    I'm experimenting with the restfulserver (http://doc.silverstripe.org/doku.php?id=restfulserver) to manipulate the "Member" object and I think it would be useful for my project, however I'd like to avoid any modifications to the actual SS core files and keep my changes to code in "mysite".

    Is this possible?


  • Ingo
    Forum Moderator
    801 Posts

    Re: RestfulServer and custom classes? Link to this post

    You can subclass RestfulServer and use custom routing:

    Director::addRules(100, array(
       'api/v1//Member => 'CustomMemberRestfulServer'

    For adding properties to the built-in Member class, read up about DataObjectDecorator

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.