Extend form container via neon

Pavel Kravčík
Member | 1182
+
0
-

Hey, is it possible replace this by “clear neon way” without PHP code? Ofcourse I can do it via Compiler extension, but is another possibility?

	\Code\Component\Form::extensionMethod(
	'addCurrency',
	    function(\Nette\Forms\Container $container, $name, $title = 'currencyInput') {
	    return $container[$name] = new \Scania\Extension\CurrencyInput($title);
	    }
	);

Something like:

form:
	extension:
		addCurrency: ClassPath
David Grudl
Nette Core | 8130
+
0
-

No.

Pavel Kravčík
Member | 1182
+
0
-

K, thx.

Felix
Nette Core | 1189
+
0
-

I think it's nice idea, do you mind to implement it to contributte/forms? I can also do it by myself.

@PavelKravčík

Last edited by Felix (2018-03-31 12:07)

Pavel Kravčík
Member | 1182
+
0
-

I have already put to “some-longterm-sugar-todo”. So when I implement this I can share solution to contributte.