Skip to content

Instantly share code, notes, and snippets.

@Majkl578
Created May 15, 2010 00:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Majkl578/401898 to your computer and use it in GitHub Desktop.
Save Majkl578/401898 to your computer and use it in GitHub Desktop.
<?php
namespace App\Controls;
class Foo extends \App\Basis\Control
{
}
{*šablona komponenty*}
<?php
namespace App\Basis;
class Control extends \Nette\Application\Control
{
public function createTemplate()
{
$template = parent::createTemplate();
$template->setFile(preg_replace('~\.php$~Ui', '.phtml', $this->reflection->getFilename()));
return $template;
}
public function render()
{
return $this->template->render();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment