- Member | 2
Question about DefaultFormRenderer. This is on more places, but one example:
public function renderControl(Nette\Forms\Control $control): Html
After accepting parameter of Nette\Forms\Control, quite a lot methods, which are NOT defined in Nette\Forms\Control, are used. It's these:
$control->getOption(...); $control->setOption(...); $control->getForm(...); $control->isRequired(...); $control->getLabel(...); $control->getControl(...); $control->hasErrors(...);
1)Why there is not used Nette\Forms\Controls\BaseControl instead of Nette\Forms\Control? BaseControl have all these methods needed by renderer.
2)Why PHPStorm is OK with it and not yelling on me (as usually :D) something like “method ‘getOption’ not found in Nette\Forms\Control”?