129: </div>
130: <div class="grid-item shop-contacts">
131: <ul>
132: ';
133: if ($store->opening_hours) /* line 52 */ {
134: echo ' <li>
135: <span class="icon"><img src="/';
136: echo LR\Filters::escapeHtmlAttr(LR\Filters::safeUrl($urlSuffix)) /* line 53 */;
137: echo 'img/icons/clock2.svg" height="29" alt="icon - clock"></span>
138: <span>';
139: echo ($this->filters->nbsp)(($this->filters->nl2br)(($this->filters->openingHours)($store))) /* line 54 */;
140: echo '</span>
141: </li>
142: ';
143: }
44: <img src="{='images/stores/' . $store->id . '/logo.' . $store->logo_extension|autoVersion}" alt="logo - {$store->name}">
45: {else}
46: <strong class="title">{$store->name}</strong>
47: {/if}
48: </div>
49: </div>
50: <div class="grid-item shop-contacts">
51: <ul>
52: <li n:if="$store->opening_hours">
53: <span class="icon"><img src="/{$urlSuffix}img/icons/clock2.svg" height="29" alt="icon - clock"></span>
54: <span>{$store|openingHours|nl2br|nbsp|noescape}</span>
55: </li>
56: <li n:if="$store->presentation || $store->facebook || $store->instagram">
57: <span class="icon"><img src="/{$urlSuffix}img/icons/web.svg" height="27" alt="icon - globe"></span>
58: <span>
299:
300: if (!$block) {
301: $hint = ($t = Latte\Helpers::getSuggestion($this->getBlockNames($layer), $name))
302: ? ", did you mean '$t'?"
303: : '.';
304: $name = $layer ? "$layer $name" : $name;
305: throw new Latte\RuntimeException("Cannot include undefined block '$name'$hint");
306: }
307:
308: $this->filter(
309: function () use ($block, $params): void { reset($block->functions)($params); },
310: $mod,
311: $block->contentType,
312: "block $name"
313: );
354: $block->functions = array_merge($block->functions, $functions);
355: }
356:
357:
358: /**
359: * @param string|\Closure|null $mod content-type name or modifier closure
360: */
361: private function filter(callable $function, $mod, string $contentType, string $name): void
362: {
363: if ($mod === null || $mod === $contentType) {
364: $function();
365:
366: } elseif ($mod instanceof \Closure) {
367: echo $mod($this->capture($function), $contentType);
368:
302: ? ", did you mean '$t'?"
303: : '.';
304: $name = $layer ? "$layer $name" : $name;
305: throw new Latte\RuntimeException("Cannot include undefined block '$name'$hint");
306: }
307:
308: $this->filter(
309: function () use ($block, $params): void { reset($block->functions)($params); },
310: $mod,
311: $block->contentType,
312: "block $name"
313: );
314: }
315:
316:
| $function |
|
| $mod | 'html'
|
| $contentType | 'html'
|
| $name | 'block content'
|
324: foreach ($flashes as $flash) /* line 126 */ {
325: echo ' <div role="alert"';
326: echo ($ʟ_tmp = array_filter(['flash', $flash->type])) ? ' class="' . LR\Filters::escapeHtmlAttr(implode(" ", array_unique($ʟ_tmp))) . '"' : "" /* line 126 */;
327: echo '>';
328: echo LR\Filters::escapeHtmlText($flash->message) /* line 126 */;
329: echo '</div>
330: ';
331: $iterations++;
332: }
333: echo "\n";
334: $this->renderBlock('content', [], 'html') /* line 128 */;
335: echo '</main>
336:
337: <footer id="footer">
338: <div class="footer-top">
118: </div>
119: </div>
120: </div>
121:
122: {ifset header}{include header}{/ifset}
123: </header>
124:
125: <main id="main">
126: <div n:foreach="$flashes as $flash" n:class="flash, $flash->type" role="alert">{$flash->message}</div>
127:
128: {include content}
129: </main>
130:
131: <footer id="footer">
132: <div class="footer-top">
| $name | 'content'
|
| $params | array (0)
|
| $mod | 'html'
|
161: /**
162: * Renders template.
163: * @internal
164: */
165: public function render(?string $block = null): void
166: {
167: $level = ob_get_level();
168: try {
169: $this->prepare();
170: if (!$this->doRender($block)) {
171: $this->main();
172: }
173:
174: } catch (\Throwable $e) {
175: while (ob_get_level() > $level) {
193:
194: if ($this->referenceType === 'import') {
195: if ($this->parentName) {
196: throw new Latte\RuntimeException('Imported template cannot use {extends} or {layout}, use {import}');
197: }
198:
199: } elseif ($this->parentName) { // extends
200: ob_start(function () {});
201: $this->params = $this->main();
202: ob_end_clean();
203: $this->createTemplate($this->parentName, $this->params, 'extends')->render($block);
204:
205: } elseif ($block !== null) { // single block rendering
206: $this->renderBlock($block, $this->params);
207:
160:
161: /**
162: * Renders template.
163: * @internal
164: */
165: public function render(?string $block = null): void
166: {
167: $level = ob_get_level();
168: try {
169: $this->prepare();
170: if (!$this->doRender($block)) {
171: $this->main();
172: }
173:
174: } catch (\Throwable $e) {
92:
93: /**
94: * Renders template to output.
95: * @param object|mixed[] $params
96: */
97: public function render(string $name, $params = [], ?string $block = null): void
98: {
99: $template = $this->createTemplate($name, $this->processParams($params));
100: $template->global->coreCaptured = false;
101: ($this->probe)($template);
102: $template->render($block);
103: }
104:
105:
106: /**
36: return $this->latte;
37: }
38:
39:
40: /**
41: * Renders template to output.
42: */
43: public function render(?string $file = null, array $params = []): void
44: {
45: Nette\Utils\Arrays::toObject($params, $this);
46: $this->latte->render($file ?: $this->file, $this);
47: }
48:
49:
50: /**
| $name | '/var/www/html/fw45ypwsjg/shop-land.eu/www/chrudim/app/Presenters/templates/Homepage/store.latte'
|
| $params |
|
40: return $this->source;
41: }
42:
43:
44: /**
45: * Sends response to output.
46: */
47: public function send(Nette\Http\IRequest $httpRequest, Nette\Http\IResponse $httpResponse): void
48: {
49: if ($this->source instanceof Nette\Application\UI\Template) {
50: $this->source->render();
51:
52: } else {
53: echo $this->source;
54: }
161:
162: Arrays::invoke($this->onPresenter, $this, $this->presenter);
163: $response = $this->presenter->run(clone $request);
164:
165: if ($response instanceof Responses\ForwardResponse) {
166: $request = $response->getRequest();
167: goto process;
168: }
169:
170: Arrays::invoke($this->onResponse, $this, $response);
171: $response->send($this->httpRequest, $this->httpResponse);
172: }
173:
174:
175: public function processException(\Throwable $e): void
| $httpRequest |
|
| $httpResponse |
|
80: }
81:
82:
83: /**
84: * Dispatch a HTTP request to a front controller.
85: */
86: public function run(): void
87: {
88: try {
89: Arrays::invoke($this->onStartup, $this);
90: $this->processRequest($this->createInitialRequest());
91: Arrays::invoke($this->onShutdown, $this);
92:
93: } catch (\Throwable $e) {
94: Arrays::invoke($this->onError, $this, $e);
1: <?php
2:
3: declare(strict_types=1);
4:
5: require __DIR__ . '/../vendor/autoload.php';
6:
7: App\Bootstrap::boot()
8: ->createContainer()
9: ->getByType(Nette\Application\Application::class)
10: ->run();
11: