Jump to:

5513 Posts in 1732 Topics by 1218 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Newbie - do extension hooks exist?

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

Page: 1
Go to End
Author Topic: 501 Views
  • davidhyland
    Avatar
    Community Member
    2 Posts

    Newbie - do extension hooks exist? Link to this post

    Hello there!

    I'm a Silverstripe noob and have been tasked with creating some custom functionality with an existing site (v2.3.3). Basically I need to extract data from the database at certain points and post it to webCRM's API.

    Forgive the probably obvious question but does Silverstripe come with extension hooks that I can use at certain points to do this? This would need to be done upon completion of a member registration, on updating the member profile and on successful completion of a worldpay transaction.

    I am only just starting to get to grips with how SS works so any pointers would be greatly appreciated.

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Newbie - do extension hooks exist? Link to this post

    What hooks are you wanting? Popular ones are onBeforeWrite() and onAfterWrite() (when saving objects to the database).

    http://doc.silverstripe.org/sapphire/en/topics/datamodel#onbeforewrite

    You can find any hooks in core by looking for $this->extend() of which their are quite a few!

  • davidhyland
    Avatar
    Community Member
    2 Posts

    Re: Newbie - do extension hooks exist? Link to this post

    Hey Willr,

    Thanks for the reply. At the moment I'm not certain what hooks I need, but your reply certainly points me in the right direction so I can hopefully figure that out

    Many thanks!

    501 Views
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.