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

Notice: This thread is very old.

6 years ago

mcmatak
Member | 500
+
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 ?

6 years ago

David Grudl
Nette Core | 7065
+
+1
-

Dej to do služby nette.latteFactory.

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

6 years ago

mcmatak
Member | 500
+
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?

:(

6 years ago

David Grudl
Nette Core | 7065
+
0
-

Myslím dát tam jen ten setup

6 years ago

David Grudl
Nette Core | 7065
+
0
-

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

6 years ago

mcmatak
Member | 500
+
0
-

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

6 years ago

Majkl578
Moderator | 1376
+
0
-

This is english forum, not czech.