Jump to:

22970 Posts in 11572 Topics by 2823 members

General Questions

SilverStripe Forums » General Questions » Inheritance

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 552 Views
  • bebabeba
    Avatar
    Community Member
    192 Posts

    Inheritance Link to this post

    Hi!
    For me is not clear the idea of inheritance between page.
    I create Page A and Page B. Both of them extends Page.
    1. I define a function (function C) in Page Controller. Can I use this function in Page A and B Controller?
    2. I define a function (function D) in Page A controller. Can I use This function in Page B controller?

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Inheritance Link to this post

    I create Page A and Page B. Both of them extends Page.

    1. I define a function (function C) in Page Controller. Can I use this function in Page A and B Controller?

    yes, because both pages inheirt from page controller

    2. I define a function (function D) in Page A controller. Can I use This function in Page B controller?

    no, only in page a

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