Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

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

Inheritance


Reply

2 Posts   601 Views

Avatar
bebabeba

19 July 2010 at 9:28pm Community Member, 192 Posts

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?

Avatar
swaiba

19 July 2010 at 9:41pm Forum Moderator, 1796 Posts

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