Jump to:

3373 Posts in 998 Topics by 712 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: 766 Views
  • Ryan M.
    Avatar
    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
    Avatar
    Forum Moderator
    5464 Posts

    Re: Decorating Member class Link to this post

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

    766 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.