Skip to content

Commit

Permalink
Removed VariableTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed May 6, 2016
1 parent af63ddc commit 99249bf
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 31 deletions.
2 changes: 1 addition & 1 deletion src/Bridges/ApplicationLatte/UIMacros.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function initialize()
public function finalize()
{
return [
'if (Nette\Bridges\ApplicationLatte\UIRuntime::initialize($this, $this->blockQueue)) return; $template = $this->params["template"];',
'if (Nette\Bridges\ApplicationLatte\UIRuntime::initialize($this, $this->blockQueue)) return;',
'',
$this->extends ? '' : '$this->parentName = $this->parentName ?: ($this->blocks && !$this->getReferringTemplate() && $this->params["_control"] instanceof Nette\Application\UI\Presenter
? $this->params["_control"]->findLayoutTemplateFile() : NULL);',
Expand Down
3 changes: 0 additions & 3 deletions src/Bridges/ApplicationLatte/UIRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ class UIRuntime
*/
public static function initialize(Latte\Template $template, $blockQueue)
{
// back compatibility
new VariableTemplate($template);

// snippet support
$params = $template->getParameters();
if (!$template->getParentName() && !empty($params['_control']->snippetMode)) {
Expand Down
23 changes: 0 additions & 23 deletions tests/Bridges.Latte/VariableTemplate.phpt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class Template%a% extends Latte\Template
%A%
// prolog Nette\Bridges\ApplicationLatte\UIMacros
if (Nette\Bridges\ApplicationLatte\UIRuntime::initialize($this, $this->blockQueue)) return;
$template = $this->params["template"];

// main template
?><div id="<?php echo $_control->getSnippetId('outer1') ?>"><?php call_user_func(reset($this->blockQueue['_outer1']), $this->params) ?></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class Template%a% extends Latte\Template
%A%
// prolog Nette\Bridges\ApplicationLatte\UIMacros
if (Nette\Bridges\ApplicationLatte\UIRuntime::initialize($this, $this->blockQueue)) return;
$template = $this->params["template"];

// main template
?><div id="<?php echo $_control->getSnippetId('outer') ?>"><?php call_user_func(reset($this->blockQueue['_outer']), $this->params) ?></div><?php
Expand Down
1 change: 0 additions & 1 deletion tests/Bridges.Latte/expected/UIMacros.snippet.alt.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class Template%a% extends Latte\Template
%A%
// prolog Nette\Bridges\ApplicationLatte\UIMacros
if (Nette\Bridges\ApplicationLatte\UIRuntime::initialize($this, $this->blockQueue)) return;
$template = $this->params["template"];

// main template
?> <div class="test"<?php echo ' id="' . $_control->getSnippetId('outer') . '"' ?>>
Expand Down
1 change: 0 additions & 1 deletion tests/Bridges.Latte/expected/UIMacros.snippet.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class Template%a% extends Latte\Template
%A%
// prolog Nette\Bridges\ApplicationLatte\UIMacros
if (Nette\Bridges\ApplicationLatte\UIRuntime::initialize($this, $this->blockQueue)) return;
$template = $this->params["template"];

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

0 comments on commit 99249bf

Please sign in to comment.