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   671 Views

Avatar
bebabeba

Community Member, 193 Posts

19 July 2010 at 9:28pm

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

Forum Moderator, 1805 Posts

19 July 2010 at 9:41pm

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