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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Inheritance


Go to End


2 Posts   908 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, 1899 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