@@ -57,10 +57,10 @@ discard block |
||
57 | 57 | */ |
58 | 58 | protected $templateFile; |
59 | 59 | |
60 | - /** |
|
61 | - * @var int |
|
62 | - */ |
|
63 | - protected $displayRelatedPages; |
|
60 | + /** |
|
61 | + * @var int |
|
62 | + */ |
|
63 | + protected $displayRelatedPages; |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * @var Localization\ITranslator |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function __construct( |
89 | 89 | $templateFile = NULL, |
90 | - $displayRelatedPages = NULL, |
|
90 | + $displayRelatedPages = NULL, |
|
91 | 91 | Nette\ComponentModel\IContainer $parent = NULL, $name = NULL |
92 | 92 | ) { |
93 | 93 | // TODO: remove, only for tests |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | if ($templateFile) { |
97 | 97 | $this->setTemplateFile($templateFile); |
98 | 98 | } |
99 | - $this->displayRelatedPages = (int)$displayRelatedPages; |
|
99 | + $this->displayRelatedPages = (int)$displayRelatedPages; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $steps = [$page]; |
233 | 233 | |
234 | 234 | } else { |
235 | - $relatedPages = $this->displayRelatedPages ?: 3; |
|
235 | + $relatedPages = $this->displayRelatedPages ?: 3; |
|
236 | 236 | $arr = range(max($paginator->firstPage, $page - $relatedPages), min($paginator->lastPage, $page + $relatedPages)); |
237 | 237 | $count = 4; |
238 | 238 | $quotient = ($paginator->pageCount - 1) / $count; |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | if ($templateFile) { |
97 | 97 | $this->setTemplateFile($templateFile); |
98 | 98 | } |
99 | - $this->displayRelatedPages = (int)$displayRelatedPages; |
|
99 | + $this->displayRelatedPages = (int) $displayRelatedPages; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
@@ -107,8 +107,8 @@ discard block |
||
107 | 107 | // Check if control has template |
108 | 108 | if ($this->template instanceof Nette\Bridges\ApplicationLatte\Template) { |
109 | 109 | // Assign vars to template |
110 | - $this->template->steps = $this->getSteps(); |
|
111 | - $this->template->paginator = $this->getPaginator(); |
|
110 | + $this->template->steps = $this->getSteps(); |
|
111 | + $this->template->paginator = $this->getPaginator(); |
|
112 | 112 | $this->template->handle = 'showPage!'; |
113 | 113 | $this->template->useAjax = $this->useAjax; |
114 | 114 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | // If template was not defined before... |
121 | 121 | if ($this->template->getFile() === NULL) { |
122 | 122 | // ...try to get base component template file |
123 | - $templateFile = !empty($this->templateFile) ? $this->templateFile : __DIR__ . DIRECTORY_SEPARATOR .'template'. DIRECTORY_SEPARATOR .'default.latte'; |
|
123 | + $templateFile = !empty($this->templateFile) ? $this->templateFile : __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default.latte'; |
|
124 | 124 | $this->template->setFile($templateFile); |
125 | 125 | } |
126 | 126 | |
@@ -179,12 +179,12 @@ discard block |
||
179 | 179 | // Check if template file exists... |
180 | 180 | if (!is_file($templateFile)) { |
181 | 181 | // ...check if extension template is used |
182 | - if (is_file(__DIR__ . DIRECTORY_SEPARATOR .'template'. DIRECTORY_SEPARATOR . $templateFile)) { |
|
183 | - $templateFile = __DIR__ . DIRECTORY_SEPARATOR .'template'. DIRECTORY_SEPARATOR . $templateFile; |
|
182 | + if (is_file(__DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile)) { |
|
183 | + $templateFile = __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile; |
|
184 | 184 | |
185 | 185 | } else { |
186 | 186 | // ...if not throw exception |
187 | - throw new Exceptions\FileNotFoundException('Template file "'. $templateFile .'" was not found.'); |
|
187 | + throw new Exceptions\FileNotFoundException('Template file "'.$templateFile.'" was not found.'); |
|
188 | 188 | } |
189 | 189 | } |
190 | 190 |