837:
838: protected function handleInvalidLink(InvalidLinkException $e): string
843: {
844: if ($this->invalidLinkMode & self::InvalidLinkException) {
845: throw $e;
846: } elseif ($this->invalidLinkMode & self::InvalidLinkWarning) {
847: trigger_error('Invalid link: ' . $e->getMessage(), E_USER_WARNING);
848: }
849:
850: return $this->invalidLinkMode & self::InvalidLinkTextual
851: ? '#error: ' . $e->getMessage()
| $message |
|
| $error_level |
512
|
public function link(string $destination, $args = []): string
289: {
290: try {
291: $args = func_num_args() < 3 && is_array($args)
292: ? $args
293: : array_slice(func_get_args(), 1);
294: return $this->getPresenter()->getLinkGenerator()->link($destination, $args, $this, 'link');
295:
296: } catch (InvalidLinkException $e) {
297: return $this->getPresenter()->handleInvalidLink($e);
298: }
299: }
300:
301:
131: </button>
132: </fieldset>
133: <p>';
134: echo ($this->filters->translate)('reo_add_reference_form_footer') ;
135: echo '</p>
136: </div>
137: <div class="uk-width-auto@s">
138: <p>';
139: echo ($this->filters->translate)('reo_add_reference_form_gdpr') ;
140: echo ' <a href="';
141: echo LR\Filters::escapeHtmlAttr($this->global->uiPresenter->link('ProcessPersonalData:default')) /* line 43 */;
142: echo '" title="';
143: echo LR\Filters::escapeHtmlAttr(($this->filters->striptags)(($this->filters->translate)('reo_add_reference_form_gdpr_link'))) ;
144: echo '">';
145: echo LR\Filters::escapeHtmlText(($this->filters->translate)('reo_add_reference_form_gdpr_link')) ;
33: <button n:name="submit" class="button button-main">
34: {_reo_add_reference_form_submit}
35: <span class="ico">
36: <img loading="lazy" src="{$basePath}/www/RealEstateOffice/images/svg/send.svg" alt="{_send}" width="16" height="16" data-uk-svg>
37: </span>
38: </button>
39: </fieldset>
40: <p>{_reo_add_reference_form_footer|noescape}</p>
41: </div>
42: <div class="uk-width-auto@s">
43: <p>{_reo_add_reference_form_gdpr|noescape} <a href="{plink ProcessPersonalData:default}" title="{_reo_add_reference_form_gdpr_link|striptags}">{_reo_add_reference_form_gdpr_link}</a></p>
44: </div>
45: </div>
46: <div n:foreach="$form->ownErrors as $error" class="uk-alert-danger" data-uk-alert>
47: <a class="uk-alert-close" data-uk-close></a>
| $destination |
'ProcessPersonalData:default'
|
129:
130: if (!$block) {
131: $hint = $layer && ($t = Latte\Helpers::getSuggestion($this->getBlockNames($layer), $name))
132: ? ", did you mean '$t'?"
133: : '.';
134: $name = $layer ? "$layer $name" : $name;
135: throw new Latte\RuntimeException("Cannot include undefined block '$name'$hint");
136: }
137:
138: $this->filter(
139: fn() => reset($block->functions)($params),
140: $mod,
141: $block->contentType,
142: "block $name",
143: );
205: return $child;
206: }
207:
208:
209: private function filter(callable $producer, string|\Closure|null $targetType, string $contentType, string $name): void
213: {
214: if ($targetType === null || $targetType === $contentType) {
215: $producer();
216:
217: } elseif ($targetType instanceof \Closure) {
218: echo $targetType($this->capture($producer), $contentType);
219:
128: : ($this->blocks[self::LayerLocal][$name] ?? $this->blocks[self::LayerTop][$name] ?? null);
129:
130: if (!$block) {
131: $hint = $layer && ($t = Latte\Helpers::getSuggestion($this->getBlockNames($layer), $name))
132: ? ", did you mean '$t'?"
133: : '.';
134: $name = $layer ? "$layer $name" : $name;
135: throw new Latte\RuntimeException("Cannot include undefined block '$name'$hint");
136: }
137:
138: $this->filter(
139: fn() => reset($block->functions)($params),
140: $mod,
141: $block->contentType,
142: "block $name",
| $producer |
|
| $targetType |
null
|
| $contentType |
'html'
|
| $name |
'block '
|
17: public function main(array $ʟ_args): void
18: {
19: extract($ʟ_args);
20: unset($ʟ_args);
21:
22: if ($this->global->snippetDriver?->renderSnippets($this->blocks[self::LayerSnippet], $this->params)) {
23: return;
24: }
25:
26: echo '<div id="', htmlspecialchars($this->global->snippetDriver->getHtmlId('')), '">';
27: $this->renderBlock('', [], null, 'snippet') /* line 1 */;
28: echo '</div>';
29: }
30:
31:
1: {snippet}
2: <form n:name="form" class="form-label form-js-label">
3: <div class="uk-grid-small" data-uk-grid>
4: <div class="uk-width-1-1">
5: <fieldset>
6: <input n:name="author">
7: <label n:name="author">{_reo_add_reference_form_name}</label>
8: </fieldset>
9: </div>
10: <div class="uk-width-1-1">
11: <p class="set-rating">
12: <span>{_reo_add_reference_form_my_rating}</span>
13: <span class="rating" style="background-size: 0% 100%">
14: <img loading="lazy" src="{$basePath}/www/RealEstateOffice/images/svg/rating.svg" alt="{_rating}" data-uk-svg>
15: </span>
| $name |
''
|
| $params |
array (0)
|
| $mod |
null
|
| $layer |
'snippet'
|
98: }
99:
100: } elseif ($this->parentName) { $this->params = $params;
102: $this->createTemplate($this->parentName, $params, 'extends')->render($block);
103:
104: } elseif ($block !== null) { $this->renderBlock($block, $this->params);
106:
107: } else {
108: $this->main($params);
109: }
110: }
111:
112:
70:
71:
72: public function render(string $name, object|array $params = [], ?string $block = null): void
77: {
78: $template = $this->createTemplate($name, $this->processParams($params));
79: $template->global->coreCaptured = false;
80: $template->render($block);
81: }
82:
83:
84:
33: return $this->latte;
34: }
35:
36:
37: public function render(?string $file = null, array $params = []): void
41: {
42: Nette\Utils\Arrays::toObject($params, $this);
43: $this->latte->render($file ?? $this->file, $this);
44: }
45:
46:
47:
| $name |
'/var/www/wivprivate.cz/data/www/wivprivate.cz/theme/FrontendModule/Components/AddReference/default.latte'
|
| $params |
|
71: $this->onRedirect();
72: $this->redirect('this');
73: }
74: }
75:
76: public function render(string $customTemplate = 'default'): void
77: {
78: $this->template->setFile($this->getTemplatePath($customTemplate . '.latte'));
79: $this->template->setTranslator($this->translator);
80: $this->template->added = $this->added;
81: $this->template->render();
82: }
83:
84: protected function createComponentForm(): FrontendForm
85: {
169: echo '</h2>
170: <p class="subtitle">';
171: echo LR\Filters::escapeHtmlText(($this->filters->translate)('reo_add_reference_modal_subtitle')) ;
172: echo '</p>
173: </div>
174: </div>
175: <div class="uk-modal-body">
176: ';
177: $ʟ_tmp = $this->global->uiControl->getComponent('addReference');
178: if ($ʟ_tmp instanceof Nette\Application\UI\Renderable) $ʟ_tmp->redrawControl(null, false);
179: $ʟ_tmp->render() /* line 96 */;
180:
181: echo ' </div>
182: </div>
183: </div>
86: <div id="addReferenceFormModal" data-uk-modal>
87: <div class="uk-modal-dialog uk-margin-auto-vertical">
88: <a class="uk-modal-close-default" data-uk-close></a>
89: <div class="uk-modal-header">
90: <div class="section-title">
91: <h2>{_reo_add_reference_modal_title}</h2>
92: <p class="subtitle">{_reo_add_reference_modal_subtitle}</p>
93: </div>
94: </div>
95: <div class="uk-modal-body">
96: {control addReference}
97: </div>
98: </div>
99: </div>
100:
129:
130: if (!$block) {
131: $hint = $layer && ($t = Latte\Helpers::getSuggestion($this->getBlockNames($layer), $name))
132: ? ", did you mean '$t'?"
133: : '.';
134: $name = $layer ? "$layer $name" : $name;
135: throw new Latte\RuntimeException("Cannot include undefined block '$name'$hint");
136: }
137:
138: $this->filter(
139: fn() => reset($block->functions)($params),
140: $mod,
141: $block->contentType,
142: "block $name",
143: );
205: return $child;
206: }
207:
208:
209: private function filter(callable $producer, string|\Closure|null $targetType, string $contentType, string $name): void
213: {
214: if ($targetType === null || $targetType === $contentType) {
215: $producer();
216:
217: } elseif ($targetType instanceof \Closure) {
218: echo $targetType($this->capture($producer), $contentType);
219:
128: : ($this->blocks[self::LayerLocal][$name] ?? $this->blocks[self::LayerTop][$name] ?? null);
129:
130: if (!$block) {
131: $hint = $layer && ($t = Latte\Helpers::getSuggestion($this->getBlockNames($layer), $name))
132: ? ", did you mean '$t'?"
133: : '.';
134: $name = $layer ? "$layer $name" : $name;
135: throw new Latte\RuntimeException("Cannot include undefined block '$name'$hint");
136: }
137:
138: $this->filter(
139: fn() => reset($block->functions)($params),
140: $mod,
141: $block->contentType,
142: "block $name",
| $producer |
|
| $targetType |
'html'
|
| $contentType |
'html'
|
| $name |
'block content'
|
public function blockContent(array $ʟ_args): void
71: {
72: extract($this->params);
73: extract($ʟ_args);
74: unset($ʟ_args);
75:
76: $this->global->snippetDriver->enter('content', 'area');
77: try {
78: echo ' <main>
79: ';
80: $this->renderBlock('content', [], 'html') /* line 8 */;
81: echo ' </main>
82: ';
83:
84: } finally {
1: {layout '../../../App/FrontendModule/templates/@layout.latte'}
2: {block bodyStructure}
3: {snippetArea header}
4: {include file '@header.latte'}
5: {/snippetArea}
6: {snippetArea content}
7: <main>
8: {include block content}
9: </main>
10: {/snippetArea}
11: {snippetArea footer}
12: {include file '@footer.latte'}
13: {/snippetArea}
14: {/block}
15:
| $name |
'content'
|
| $params |
array (0)
|
| $mod |
'html'
|
129:
130: if (!$block) {
131: $hint = $layer && ($t = Latte\Helpers::getSuggestion($this->getBlockNames($layer), $name))
132: ? ", did you mean '$t'?"
133: : '.';
134: $name = $layer ? "$layer $name" : $name;
135: throw new Latte\RuntimeException("Cannot include undefined block '$name'$hint");
136: }
137:
138: $this->filter(
139: fn() => reset($block->functions)($params),
140: $mod,
141: $block->contentType,
142: "block $name",
143: );
205: return $child;
206: }
207:
208:
209: private function filter(callable $producer, string|\Closure|null $targetType, string $contentType, string $name): void
213: {
214: if ($targetType === null || $targetType === $contentType) {
215: $producer();
216:
217: } elseif ($targetType instanceof \Closure) {
218: echo $targetType($this->capture($producer), $contentType);
219:
128: : ($this->blocks[self::LayerLocal][$name] ?? $this->blocks[self::LayerTop][$name] ?? null);
129:
130: if (!$block) {
131: $hint = $layer && ($t = Latte\Helpers::getSuggestion($this->getBlockNames($layer), $name))
132: ? ", did you mean '$t'?"
133: : '.';
134: $name = $layer ? "$layer $name" : $name;
135: throw new Latte\RuntimeException("Cannot include undefined block '$name'$hint");
136: }
137:
138: $this->filter(
139: fn() => reset($block->functions)($params),
140: $mod,
141: $block->contentType,
142: "block $name",
| $producer |
|
| $targetType |
null
|
| $contentType |
'html'
|
| $name |
'block content'
|
38:
39:
40: public function blockBodyStructure(array $ʟ_args): void
42: {
43: extract($this->params);
44: extract($ʟ_args);
45: unset($ʟ_args);
46:
47: $this->renderBlock('header', [], null, 'snippet') ;
48: $this->renderBlock('content', [], null, 'snippet') /* line 6 */;
49: $this->renderBlock('footer', [], null, 'snippet') ;
50: }
51:
52:
1: {layout '../../../App/FrontendModule/templates/@layout.latte'}
2: {block bodyStructure}
3: {snippetArea header}
4: {include file '@header.latte'}
5: {/snippetArea}
6: {snippetArea content}
7: <main>
8: {include block content}
9: </main>
10: {/snippetArea}
11: {snippetArea footer}
12: {include file '@footer.latte'}
13: {/snippetArea}
14: {/block}
15:
| $name |
'content'
|
| $params |
array (0)
|
| $mod |
null
|
| $layer |
'snippet'
|
129:
130: if (!$block) {
131: $hint = $layer && ($t = Latte\Helpers::getSuggestion($this->getBlockNames($layer), $name))
132: ? ", did you mean '$t'?"
133: : '.';
134: $name = $layer ? "$layer $name" : $name;
135: throw new Latte\RuntimeException("Cannot include undefined block '$name'$hint");
136: }
137:
138: $this->filter(
139: fn() => reset($block->functions)($params),
140: $mod,
141: $block->contentType,
142: "block $name",
143: );
205: return $child;
206: }
207:
208:
209: private function filter(callable $producer, string|\Closure|null $targetType, string $contentType, string $name): void
213: {
214: if ($targetType === null || $targetType === $contentType) {
215: $producer();
216:
217: } elseif ($targetType instanceof \Closure) {
218: echo $targetType($this->capture($producer), $contentType);
219:
128: : ($this->blocks[self::LayerLocal][$name] ?? $this->blocks[self::LayerTop][$name] ?? null);
129:
130: if (!$block) {
131: $hint = $layer && ($t = Latte\Helpers::getSuggestion($this->getBlockNames($layer), $name))
132: ? ", did you mean '$t'?"
133: : '.';
134: $name = $layer ? "$layer $name" : $name;
135: throw new Latte\RuntimeException("Cannot include undefined block '$name'$hint");
136: }
137:
138: $this->filter(
139: fn() => reset($block->functions)($params),
140: $mod,
141: $block->contentType,
142: "block $name",
| $producer |
|
| $targetType |
null
|
| $contentType |
'html'
|
| $name |
'block bodyStructure'
|
94: echo ' </head>
95: <body';
96: echo ($ʟ_tmp = array_filter([$bodyClass ? $bodyClass : null])) ? ' class="' . LR\Filters::escapeHtmlAttr(implode(" ", array_unique($ʟ_tmp))) . '"' : "" ;
97: echo '>
98: ';
99: $ʟ_tmp = $this->global->uiControl->getComponent('scripts-body');
100: if ($ʟ_tmp instanceof Nette\Application\UI\Renderable) $ʟ_tmp->redrawControl(null, false);
101: $ʟ_tmp->render() ;
102:
103: echo "\n";
104: $this->renderBlock('bodyStructure', get_defined_vars()) /* line 83 */;
105: echo "\n";
106: $ʟ_tmp = $this->global->uiControl->getComponent('flashMessage');
107: if ($ʟ_tmp instanceof Nette\Application\UI\Renderable) $ʟ_tmp->redrawControl(null, false);
108: $ʟ_tmp->render() ;
73: </title>
74: {/block}
75:
76: {block canonical}
77: {control canonical}
78: {/block}
79: </head>
80: <body n:class="$bodyClass ? $bodyClass">
81: {control scripts-body}
82:
83: {block bodyStructure}
84: {snippetArea header}
85: {include file '@header.latte'}
86: {/snippetArea}
87: {snippetArea content}
| $name |
'bodyStructure'
|
| $params |
|
98: }
99:
100: } elseif ($this->parentName) { $this->params = $params;
102: $this->createTemplate($this->parentName, $params, 'extends')->render($block);
103:
104: } elseif ($block !== null) { $this->renderBlock($block, $this->params);
106:
107: } else {
108: $this->main($params);
109: }
110: }
111:
112:
92: $this->parentName = ($this->global->coreParentFinder)($this);
93: }
94:
95: if ($this->referenceType === 'import') {
96: if ($this->parentName) {
97: throw new Latte\RuntimeException('Imported template cannot use {extends} or {layout}, use {import}');
98: }
99:
100: } elseif ($this->parentName) { $this->params = $params;
102: $this->createTemplate($this->parentName, $params, 'extends')->render($block);
103:
104: } elseif ($block !== null) { $this->renderBlock($block, $this->params);
106:
92: $this->parentName = ($this->global->coreParentFinder)($this);
93: }
94:
95: if ($this->referenceType === 'import') {
96: if ($this->parentName) {
97: throw new Latte\RuntimeException('Imported template cannot use {extends} or {layout}, use {import}');
98: }
99:
100: } elseif ($this->parentName) { $this->params = $params;
102: $this->createTemplate($this->parentName, $params, 'extends')->render($block);
103:
104: } elseif ($block !== null) { $this->renderBlock($block, $this->params);
106:
70:
71:
72: public function render(string $name, object|array $params = [], ?string $block = null): void
77: {
78: $template = $this->createTemplate($name, $this->processParams($params));
79: $template->global->coreCaptured = false;
80: $template->render($block);
81: }
82:
83:
84:
33: return $this->latte;
34: }
35:
36:
37: public function render(?string $file = null, array $params = []): void
41: {
42: Nette\Utils\Arrays::toObject($params, $this);
43: $this->latte->render($file ?? $this->file, $this);
44: }
45:
46:
47:
| $name |
'/var/www/wivprivate.cz/data/www/wivprivate.cz/theme/FrontendModule/templates/ReferenceList/default.latte'
|
| $params |
|
31: return $this->source;
32: }
33:
34:
35: public function send(Nette\Http\IRequest $httpRequest, Nette\Http\IResponse $httpResponse): void
39: {
40: if ($this->source instanceof Nette\Application\UI\Template) {
41: $this->source->render();
42:
43: } else {
44: echo $this->source;
45: }
149:
150: Arrays::invoke($this->onPresenter, $this, $this->presenter);
151: $response = $this->presenter->run(clone $request);
152:
153: if ($response instanceof Responses\ForwardResponse) {
154: $request = $response->getRequest();
155: goto process;
156: }
157:
158: Arrays::invoke($this->onResponse, $this, $response);
159: $response->send($this->httpRequest, $this->httpResponse);
160: }
161:
162:
163: public function createErrorRequest(\Throwable $e): ?Request
| $httpRequest |
|
| $httpResponse |
|
67: }
68:
69:
70: public function run(): void
74: {
75: try {
76: Arrays::invoke($this->onStartup, $this);
77: $this->processRequest($this->createInitialRequest());
78: Arrays::invoke($this->onShutdown, $this);
79:
80: } catch (\Throwable $e) {
81: $this->sendHttpCode($e);
9: $parameters = $container->getParameters();
10:
11: if ($timeLimit = $parameters['time_limit'] ?? null) {
12: @set_time_limit($timeLimit);
13: }
14:
15: if ($memoryLimit = $parameters['memory_limit'] ?? null) {
16: @ini_set('memory_limit', $memoryLimit . 'M');
17: }
18:
19: $container->getByType(Application::class)->run();
20: exit;