Skip to content

Commit

Permalink
LatteExtension: inject interface to be more compatible (#288)
Browse files Browse the repository at this point in the history
Co-authored-by: Miloslav Hůla <miloslav.hula@fsv.cvut.cz>
  • Loading branch information
2 people authored and dg committed Jun 2, 2021
1 parent c18b35a commit efc5860
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Bridges/ApplicationDI/LatteExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ public function beforeCompile()
}


public static function initLattePanel(ApplicationLatte\TemplateFactory $factory, Tracy\Bar $bar, bool $all = false)
public static function initLattePanel(Nette\Application\UI\TemplateFactory $factory, Tracy\Bar $bar, bool $all = false)
{
if (!$factory instanceof ApplicationLatte\TemplateFactory) {
return;
}
$factory->onCreate[] = function (ApplicationLatte\Template $template) use ($bar, $all) {
$control = $template->getLatte()->getProviders()['uiControl'] ?? null;
if ($all || $control instanceof Nette\Application\UI\Presenter) {
Expand Down

0 comments on commit efc5860

Please sign in to comment.