I have a class with a form method and I want to inherit that method for other classes, how do I do that?
class A
{
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
$form = new Form(new ClassA());
$form->text('title', 'Title');
return $form;
}
}
class B
{
protected function form()
{
$form = new Form(new ClassB());
// How to extends method form() of class A to here ??
$form->textarea('desc', 'Description');
return $form;
}
}
Hello,
I have a class with a form method and I want to inherit that method for other classes, how do I do that?
Thanks!