Hi,
I have implemented an abstract page controller of a parent page class, since I want the children to implement the abstract functions.
So far everything seems to be working well. But can you anticipate any issues or side-effects of having abstract parent page controllers?
Parent Page with abstract Page_Controller:
class MyParentPage extends Page {
// ...
}
abstract class MyParentPage_Controller extends Page_Controller {
abstract protected function myAbstractFunction();
public function myFunction() {
// ...
return $this->myAbstractFunction();
}
}
Child Page
class MyChildPage extends MyParentPage {
// …
private static $hide_ancestor = 'MyParentPage';
}
abstract class MyChildPage_Controller extends MyParentPage_Controller {
protected function myAbstractFunction() {
return 'Something';
}
}
Thanks.
VWD.