Nette 2.1 > 2.2 nette.latte macro install in config.neon

Notice: This thread is very old.
mcmatak
Member | 490
+
0
-

i am used to install macros in config.neon

		nette.latte:
			class: \Nette\Latte\Engine
			autowired: no
			setup:
				- \System\Templates\LatteMacros::install(::$service->getCompiler())
				- \System\Application\Templates\ImageManager\ImageManagerMacro::install(::$service->getCompiler())

is there a similar way in Nette 2.2 ?

David Grudl
Nette Core | 8082
+
+1
-

Dej to do služby nette.latteFactory.

Ten zápis ::$service->getCompiler() by správně neměl fungoval, korektní je @self::getCompiler.

mcmatak
Member | 490
+
0
-

Service ‘nette.templateFactory’: Service of type Nette\Bridges\ApplicationLatte\ILatteFactory needed by Nette\Bridges\ApplicationLatte\TemplateFactory::__construct() not found. Did you register it in configuration file?

:(

David Grudl
Nette Core | 8082
+
0
-

Myslím dát tam jen ten setup

David Grudl
Nette Core | 8082
+
0
-

Proč to neděláš standardní cestou? https://doc.nette.org/en/configuring#…

mcmatak
Member | 490
+
0
-

díky udělal jsem to standardně a po pár změnách to jede, byla to nějaká historická věc

Majkl578
Moderator | 1364
+
0
-

This is english forum, not czech.