Skip to content

Commit a7049d1

Browse files
committed
Removed VariableTemplate
1 parent af63ddc commit a7049d1

File tree

8 files changed

+1
-122
lines changed

8 files changed

+1
-122
lines changed

src/Bridges/ApplicationLatte/UIMacros.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function initialize()
6161
public function finalize()
6262
{
6363
return [
64-
'if (Nette\Bridges\ApplicationLatte\UIRuntime::initialize($this, $this->blockQueue)) return; $template = $this->params["template"];',
64+
'if (Nette\Bridges\ApplicationLatte\UIRuntime::initialize($this, $this->blockQueue)) return;',
6565
'',
6666
$this->extends ? '' : '$this->parentName = $this->parentName ?: ($this->blocks && !$this->getReferringTemplate() && $this->params["_control"] instanceof Nette\Application\UI\Presenter
6767
? $this->params["_control"]->findLayoutTemplateFile() : NULL);',

src/Bridges/ApplicationLatte/UIRuntime.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ class UIRuntime
2626
*/
2727
public static function initialize(Latte\Template $template, $blockQueue)
2828
{
29-
// back compatibility
30-
new VariableTemplate($template);
31-
3229
// snippet support
3330
$params = $template->getParameters();
3431
if (!$template->getParentName() && !empty($params['_control']->snippetMode)) {

src/Bridges/ApplicationLatte/VariableTemplate.php

Lines changed: 0 additions & 91 deletions
This file was deleted.

tests/Bridges.Latte/VariableTemplate.phpt

Lines changed: 0 additions & 23 deletions
This file was deleted.

tests/Bridges.Latte/expected/UIMacros.dynamicsnippets.alt.phtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class Template%a% extends Latte\Template
1919
%A%
2020
// prolog Nette\Bridges\ApplicationLatte\UIMacros
2121
if (Nette\Bridges\ApplicationLatte\UIRuntime::initialize($this, $this->blockQueue)) return;
22-
$template = $this->params["template"];
2322

2423
// main template
2524
?><div id="<?php echo $_control->getSnippetId('outer1') ?>"><?php call_user_func(reset($this->blockQueue['_outer1']), $this->params) ?></div>

tests/Bridges.Latte/expected/UIMacros.dynamicsnippets.phtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class Template%a% extends Latte\Template
1717
%A%
1818
// prolog Nette\Bridges\ApplicationLatte\UIMacros
1919
if (Nette\Bridges\ApplicationLatte\UIRuntime::initialize($this, $this->blockQueue)) return;
20-
$template = $this->params["template"];
2120

2221
// main template
2322
?><div id="<?php echo $_control->getSnippetId('outer') ?>"><?php call_user_func(reset($this->blockQueue['_outer']), $this->params) ?></div><?php

tests/Bridges.Latte/expected/UIMacros.snippet.alt.phtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class Template%a% extends Latte\Template
2121
%A%
2222
// prolog Nette\Bridges\ApplicationLatte\UIMacros
2323
if (Nette\Bridges\ApplicationLatte\UIRuntime::initialize($this, $this->blockQueue)) return;
24-
$template = $this->params["template"];
2524

2625
// main template
2726
?> <div class="test"<?php echo ' id="' . $_control->getSnippetId('outer') . '"' ?>>

tests/Bridges.Latte/expected/UIMacros.snippet.phtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class Template%a% extends Latte\Template
2525
%A%
2626
// prolog Nette\Bridges\ApplicationLatte\UIMacros
2727
if (Nette\Bridges\ApplicationLatte\UIRuntime::initialize($this, $this->blockQueue)) return;
28-
$template = $this->params["template"];
2928

3029
// main template
3130
?><div id="<?php echo $_control->getSnippetId('') ?>"><?php call_user_func(reset($this->blockQueue['_']), $this->params) ?></div>

0 commit comments

Comments
 (0)