Jump to:

3459 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Decorating Member class

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

Page: 1
Go to End
Author Topic: 812 Views
  • Ryan M.
    Community Member
    309 Posts

    Decorating Member class Link to this post

    When you're decorating the Member class with your own stuff, do you need to refer to the new member class from then on or can you continue using 'Member'?

    For example, suppose I have a Photo object and each Photo is owned by a member. Do I need to do this:

    public static $has_one = array(
    'Member' => 'MyMember'

    or would this still work:

    public static $has_one = array(
    'Member' => 'Member'

    I feel rather silly for asking this but I haven't decorated the Member class much in the past.

  • Willr
    Forum Moderator
    5497 Posts

    Re: Decorating Member class Link to this post

    You can still refer to it as a Member. Decorators are transparent.

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.