99
1010namespace Nextras \FormsRendering \Renderers ;
1111
12+ use Nette \Forms \Control ;
1213use Nette \Forms \Controls ;
1314use Nette \Forms \Form ;
14- use Nette \Forms \IControl ;
1515use Nette \Forms \Rendering \DefaultFormRenderer ;
1616use Nette \Utils \Html ;
1717
2121 */
2222class Bs3FormRenderer extends DefaultFormRenderer
2323{
24- /** @var Controls\Button */
24+ /** @var Controls\Button|null */
2525 public $ primaryButton = null ;
2626
2727 /** @var bool */
@@ -80,7 +80,7 @@ public function renderControls($parent): string
8080 }
8181
8282
83- public function renderPair (IControl $ control ): string
83+ public function renderPair (Control $ control ): string
8484 {
8585 $ this ->controlsInit ();
8686 return parent ::renderPair ($ control );
@@ -94,21 +94,21 @@ public function renderPairMulti(array $controls): string
9494 }
9595
9696
97- public function renderLabel (IControl $ control ): Html
97+ public function renderLabel (Control $ control ): Html
9898 {
9999 $ this ->controlsInit ();
100100 return parent ::renderLabel ($ control );
101101 }
102102
103103
104- public function renderControl (IControl $ control ): Html
104+ public function renderControl (Control $ control ): Html
105105 {
106106 $ this ->controlsInit ();
107107 return parent ::renderControl ($ control );
108108 }
109109
110110
111- private function controlsInit ()
111+ private function controlsInit (): void
112112 {
113113 if ($ this ->controlsInit ) {
114114 return ;
@@ -130,7 +130,7 @@ private function controlsInit()
130130 $ control ->getControlPrototype ()->addClass ('form-control ' );
131131 } elseif ($ control instanceof Controls \Checkbox || $ control instanceof Controls \CheckboxList || $ control instanceof Controls \RadioList) {
132132 if ($ control instanceof Controls \Checkbox) {
133- $ control ->getSeparatorPrototype ()->setName ('div ' )->appendAttribute ('class ' , $ control ->getControlPrototype ()->type );
133+ $ control ->getContainerPrototype ()->setName ('div ' )->appendAttribute ('class ' , $ control ->getControlPrototype ()->type );
134134 } else {
135135 $ control ->getItemLabelPrototype ()->addClass ($ control ->getControlPrototype ()->type . '-inline ' );
136136 }
0 commit comments