@@ -18,7 +18,6 @@ |
||
| 18 | 18 | use Nette\Application; |
| 19 | 19 | use Nette\Localization; |
| 20 | 20 | use Nette\Utils; |
| 21 | - |
|
| 22 | 21 | use IPub; |
| 23 | 22 | use IPub\VisualPaginator; |
| 24 | 23 | use IPub\VisualPaginator\Exceptions; |
@@ -100,8 +100,8 @@ discard block |
||
| 100 | 100 | // Check if control has template |
| 101 | 101 | if ($this->template instanceof Nette\Bridges\ApplicationLatte\Template) { |
| 102 | 102 | // Assign vars to template |
| 103 | - $this->template->steps = $this->getSteps(); |
|
| 104 | - $this->template->paginator = $this->getPaginator(); |
|
| 103 | + $this->template->steps = $this->getSteps(); |
|
| 104 | + $this->template->paginator = $this->getPaginator(); |
|
| 105 | 105 | $this->template->handle = 'showPage!'; |
| 106 | 106 | $this->template->useAjax = $this->useAjax; |
| 107 | 107 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | // If template was not defined before... |
| 114 | 114 | if ($this->template->getFile() === NULL) { |
| 115 | 115 | // ...try to get base component template file |
| 116 | - $templateFile = !empty($this->templateFile) ? $this->templateFile : __DIR__ . DIRECTORY_SEPARATOR .'template'. DIRECTORY_SEPARATOR .'default.latte'; |
|
| 116 | + $templateFile = !empty($this->templateFile) ? $this->templateFile : __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default.latte'; |
|
| 117 | 117 | $this->template->setFile($templateFile); |
| 118 | 118 | } |
| 119 | 119 | |
@@ -172,12 +172,12 @@ discard block |
||
| 172 | 172 | // Check if template file exists... |
| 173 | 173 | if (!is_file($templateFile)) { |
| 174 | 174 | // ...check if extension template is used |
| 175 | - if (is_file(__DIR__ . DIRECTORY_SEPARATOR .'template'. DIRECTORY_SEPARATOR . $templateFile)) { |
|
| 176 | - $templateFile = __DIR__ . DIRECTORY_SEPARATOR .'template'. DIRECTORY_SEPARATOR . $templateFile; |
|
| 175 | + if (is_file(__DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile)) { |
|
| 176 | + $templateFile = __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile; |
|
| 177 | 177 | |
| 178 | 178 | } else { |
| 179 | 179 | // ...if not throw exception |
| 180 | - throw new Exceptions\FileNotFoundException('Template file "'. $templateFile .'" was not found.'); |
|
| 180 | + throw new Exceptions\FileNotFoundException('Template file "'.$templateFile.'" was not found.'); |
|
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | |
@@ -16,7 +16,6 @@ |
||
| 16 | 16 | |
| 17 | 17 | use Nette; |
| 18 | 18 | use Nette\DI; |
| 19 | -use Nette\PhpGenerator as Code; |
|
| 20 | 19 | |
| 21 | 20 | class VisualPaginatorExtension extends DI\CompilerExtension |
| 22 | 21 | { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public static function register(Nette\Configurator $config, $extensionName = 'visualPaginator') |
| 53 | 53 | { |
| 54 | - $config->onCompile[] = function (Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) { |
|
| 54 | + $config->onCompile[] = function(Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) { |
|
| 55 | 55 | $compiler->addExtension($extensionName, new VisualPaginatorExtension()); |
| 56 | 56 | }; |
| 57 | 57 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | function getTranslationResources() |
| 65 | 65 | { |
| 66 | 66 | return array( |
| 67 | - __DIR__ . '/../Translations' |
|
| 67 | + __DIR__.'/../Translations' |
|
| 68 | 68 | ); |
| 69 | 69 | } |
| 70 | 70 | } |
@@ -14,4 +14,6 @@ |
||
| 14 | 14 | |
| 15 | 15 | namespace IPub\VisualPaginator\Exceptions; |
| 16 | 16 | |
| 17 | -class FileNotFoundException extends IOException implements IException {} |
|
| 18 | 17 | \ No newline at end of file |
| 18 | +class FileNotFoundException extends IOException implements IException |
|
| 19 | +{ |
|
| 20 | +} |
|
| 19 | 21 | \ No newline at end of file |
@@ -14,4 +14,6 @@ |
||
| 14 | 14 | |
| 15 | 15 | namespace IPub\VisualPaginator\Exceptions; |
| 16 | 16 | |
| 17 | -interface IException {} |
|
| 18 | 17 | \ No newline at end of file |
| 18 | +interface IException |
|
| 19 | +{ |
|
| 20 | +} |
|
| 19 | 21 | \ No newline at end of file |
@@ -14,4 +14,6 @@ |
||
| 14 | 14 | |
| 15 | 15 | namespace IPub\VisualPaginator\Exceptions; |
| 16 | 16 | |
| 17 | -class IOException extends \RuntimeException implements IException {} |
|
| 18 | 17 | \ No newline at end of file |
| 18 | +class IOException extends \RuntimeException implements IException |
|
| 19 | +{ |
|
| 20 | +} |
|
| 19 | 21 | \ No newline at end of file |
@@ -30,7 +30,8 @@ |
||
| 30 | 30 | /** |
| 31 | 31 | * @param Components\IControl $visualPaginatorFactory |
| 32 | 32 | */ |
| 33 | - public function injectVisualPaginator(Components\IControl $visualPaginatorFactory) { |
|
| 33 | + public function injectVisualPaginator(Components\IControl $visualPaginatorFactory) |
|
| 34 | + { |
|
| 34 | 35 | $this->visualPaginatorFactory = $visualPaginatorFactory; |
| 35 | 36 | } |
| 36 | 37 | } |