diff --git a/admin/templates/articles/article-edit.php b/admin/templates/articles/article-edit.php
index 7d3e596..7b72f8e 100644
--- a/admin/templates/articles/article-edit.php
+++ b/admin/templates/articles/article-edit.php
@@ -1,5 +1,5 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
-= \Tpl::view('articles/article-edit-custom-script', [
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('articles/article-edit-custom-script', [
'article' => $this->article,
'user' => $this->user,
'languages' => $this->form->languages ?? []
diff --git a/admin/templates/articles/articles-archive-list.php b/admin/templates/articles/articles-archive-list.php
index 3e70c9a..c54663c 100644
--- a/admin/templates/articles/articles-archive-list.php
+++ b/admin/templates/articles/articles-archive-list.php
@@ -1,5 +1,5 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
viewModel->customScriptView)): ?>
- = \Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
+ = \Shared\Tpl\Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/articles/articles-list.php b/admin/templates/articles/articles-list.php
index 3e70c9a..c54663c 100644
--- a/admin/templates/articles/articles-list.php
+++ b/admin/templates/articles/articles-list.php
@@ -1,5 +1,5 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
viewModel->customScriptView)): ?>
- = \Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
+ = \Shared\Tpl\Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/articles/subpages-list.php b/admin/templates/articles/subpages-list.php
index 46aef2f..ce4d6b7 100644
--- a/admin/templates/articles/subpages-list.php
+++ b/admin/templates/articles/subpages-list.php
@@ -9,7 +9,7 @@
article_pages ) and in_array( $page['id'], $this -> article_pages ) ):?>checked="checked" endif;?> />
- = \Tpl::view( 'articles/subpages-list', [
+ = \Shared\Tpl\Tpl::view( 'articles/subpages-list', [
'pages' => $page['subpages'],
'article_pages' => $this->article_pages,
'parent_id' => $page['id'],
diff --git a/admin/templates/banners/banners-list.php b/admin/templates/banners/banners-list.php
index 3e70c9a..c54663c 100644
--- a/admin/templates/banners/banners-list.php
+++ b/admin/templates/banners/banners-list.php
@@ -1,5 +1,5 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
viewModel->customScriptView)): ?>
- = \Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
+ = \Shared\Tpl\Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/dictionaries/unit-edit.php b/admin/templates/dictionaries/unit-edit.php
index 5fe1611..d92a9df 100644
--- a/admin/templates/dictionaries/unit-edit.php
+++ b/admin/templates/dictionaries/unit-edit.php
@@ -1 +1 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
diff --git a/admin/templates/dictionaries/units-list.php b/admin/templates/dictionaries/units-list.php
index 3e70c9a..c54663c 100644
--- a/admin/templates/dictionaries/units-list.php
+++ b/admin/templates/dictionaries/units-list.php
@@ -1,5 +1,5 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
viewModel->customScriptView)): ?>
- = \Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
+ = \Shared\Tpl\Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/languages/language-edit.php b/admin/templates/languages/language-edit.php
index be2362b..e6b6284 100644
--- a/admin/templates/languages/language-edit.php
+++ b/admin/templates/languages/language-edit.php
@@ -1,2 +1,2 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
diff --git a/admin/templates/languages/languages-list.php b/admin/templates/languages/languages-list.php
index b336124..b0e03a9 100644
--- a/admin/templates/languages/languages-list.php
+++ b/admin/templates/languages/languages-list.php
@@ -1,2 +1,2 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/languages/translation-edit.php b/admin/templates/languages/translation-edit.php
index be2362b..e6b6284 100644
--- a/admin/templates/languages/translation-edit.php
+++ b/admin/templates/languages/translation-edit.php
@@ -1,2 +1,2 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
diff --git a/admin/templates/languages/translations-list.php b/admin/templates/languages/translations-list.php
index b336124..b0e03a9 100644
--- a/admin/templates/languages/translations-list.php
+++ b/admin/templates/languages/translations-list.php
@@ -1,2 +1,2 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/layouts/layout-edit.php b/admin/templates/layouts/layout-edit.php
index 5408603..b9bfbec 100644
--- a/admin/templates/layouts/layout-edit.php
+++ b/admin/templates/layouts/layout-edit.php
@@ -276,7 +276,7 @@ ob_start();
Menu: = $menu['name'];?>
- = \Tpl::view( 'layouts/subpages-list', [
+ = \Shared\Tpl\Tpl::view( 'layouts/subpages-list', [
'pages' => $menu['pages'],
'layout_pages' => $this -> layout['pages'],
'step' => 1
@@ -302,7 +302,7 @@ ob_start();
layout['categories'] ) and in_array( $category['id'], $this -> layout['categories'] ) ):?>checked="checked" endif;?> />
= $category['languages'][$this -> dlang]['title'];?>
- = \Tpl::view( 'layouts/subcategories-list', [
+ = \Shared\Tpl\Tpl::view( 'layouts/subcategories-list', [
'categories' => $category['subcategories'],
'product_categories' => $this -> layout['categories'],
'dlang' => $this -> dlang
diff --git a/admin/templates/layouts/layouts-list.php b/admin/templates/layouts/layouts-list.php
index 0f89c5b..8836268 100644
--- a/admin/templates/layouts/layouts-list.php
+++ b/admin/templates/layouts/layouts-list.php
@@ -1 +1 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/layouts/subcategories-list.php b/admin/templates/layouts/subcategories-list.php
index 72880f2..c7b8c94 100644
--- a/admin/templates/layouts/subcategories-list.php
+++ b/admin/templates/layouts/subcategories-list.php
@@ -10,7 +10,7 @@
product_categories ) and in_array( $category['id'], $this -> product_categories ) ):?>checked="checked" endif;?> />
= $category['languages'][$this -> dlang]['title'];?>
- = \Tpl::view( 'layouts/subcategories-list', [
+ = \Shared\Tpl\Tpl::view( 'layouts/subcategories-list', [
'categories' => $category['subcategories'],
'product_categories' => $this -> product_categories,
'dlang' => $this -> dlang
diff --git a/admin/templates/layouts/subpages-list.php b/admin/templates/layouts/subpages-list.php
index 61fd7eb..ad83c4f 100644
--- a/admin/templates/layouts/subpages-list.php
+++ b/admin/templates/layouts/subpages-list.php
@@ -10,7 +10,7 @@
if ( is_array( $page['subpages'] ) )
- echo \Tpl::view( 'layouts/subpages-list', [
+ echo \Shared\Tpl\Tpl::view( 'layouts/subpages-list', [
'pages' => $page['subpages'],
'layout_pages' => $this -> layout_pages,
'step' => $this -> step + 1
diff --git a/admin/templates/newsletter/email-template-edit.php b/admin/templates/newsletter/email-template-edit.php
index 3615024..93f676a 100644
--- a/admin/templates/newsletter/email-template-edit.php
+++ b/admin/templates/newsletter/email-template-edit.php
@@ -1 +1 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
\ No newline at end of file
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
\ No newline at end of file
diff --git a/admin/templates/newsletter/email-templates-admin.php b/admin/templates/newsletter/email-templates-admin.php
index 17cbbb8..e7abea0 100644
--- a/admin/templates/newsletter/email-templates-admin.php
+++ b/admin/templates/newsletter/email-templates-admin.php
@@ -1 +1 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
\ No newline at end of file
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
\ No newline at end of file
diff --git a/admin/templates/newsletter/emails-list.php b/admin/templates/newsletter/emails-list.php
index 0f89c5b..8836268 100644
--- a/admin/templates/newsletter/emails-list.php
+++ b/admin/templates/newsletter/emails-list.php
@@ -1 +1 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/newsletter/settings.php b/admin/templates/newsletter/settings.php
index 3615024..93f676a 100644
--- a/admin/templates/newsletter/settings.php
+++ b/admin/templates/newsletter/settings.php
@@ -1 +1 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
\ No newline at end of file
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
\ No newline at end of file
diff --git a/admin/templates/pages/menu-edit.php b/admin/templates/pages/menu-edit.php
index 5fe1611..d92a9df 100644
--- a/admin/templates/pages/menu-edit.php
+++ b/admin/templates/pages/menu-edit.php
@@ -1 +1 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
diff --git a/admin/templates/pages/page-edit.php b/admin/templates/pages/page-edit.php
index 5fe1611..d92a9df 100644
--- a/admin/templates/pages/page-edit.php
+++ b/admin/templates/pages/page-edit.php
@@ -1 +1 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
diff --git a/admin/templates/pages/pages-browse-list.php b/admin/templates/pages/pages-browse-list.php
index 847a337..c0ccc88 100644
--- a/admin/templates/pages/pages-browse-list.php
+++ b/admin/templates/pages/pages-browse-list.php
@@ -20,7 +20,7 @@ foreach ($menus as $menu):
Menu: = htmlspecialchars($menuName, ENT_QUOTES, 'UTF-8'); ?>
- = \Tpl::view('pages/subpages-browse-list', [
+ = \Shared\Tpl\Tpl::view('pages/subpages-browse-list', [
'pages' => $menu['pages'] ?? [],
'step' => 1,
]); ?>
diff --git a/admin/templates/pages/pages-list.php b/admin/templates/pages/pages-list.php
index c8cbe06..957c36a 100644
--- a/admin/templates/pages/pages-list.php
+++ b/admin/templates/pages/pages-list.php
@@ -32,7 +32,7 @@ foreach ($menus as $menu):
- = \Tpl::view('pages/subpages-list', [
+ = \Shared\Tpl\Tpl::view('pages/subpages-list', [
'pages' => $menu['pages'] ?? [],
'step' => 1,
]); ?>
diff --git a/admin/templates/pages/subpages-browse-list.php b/admin/templates/pages/subpages-browse-list.php
index 8c14390..370be0f 100644
--- a/admin/templates/pages/subpages-browse-list.php
+++ b/admin/templates/pages/subpages-browse-list.php
@@ -51,7 +51,7 @@ if (empty($pages)) {
- = \Tpl::view('pages/subpages-browse-list', [
+ = \Shared\Tpl\Tpl::view('pages/subpages-browse-list', [
'pages' => $page['subpages'] ?? [],
'step' => $step + 1,
]); ?>
diff --git a/admin/templates/pages/subpages-list.php b/admin/templates/pages/subpages-list.php
index f542209..f57ea9d 100644
--- a/admin/templates/pages/subpages-list.php
+++ b/admin/templates/pages/subpages-list.php
@@ -67,7 +67,7 @@ if (empty($pages)) {
- = \Tpl::view('pages/subpages-list', [
+ = \Shared\Tpl\Tpl::view('pages/subpages-list', [
'pages' => $page['subpages'] ?? [],
'step' => $step + 1,
]); ?>
diff --git a/admin/templates/product-archive/products-list.php b/admin/templates/product-archive/products-list.php
index 3e70c9a..c54663c 100644
--- a/admin/templates/product-archive/products-list.php
+++ b/admin/templates/product-archive/products-list.php
@@ -1,5 +1,5 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
viewModel->customScriptView)): ?>
- = \Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
+ = \Shared\Tpl\Tpl::view($this->viewModel->customScriptView, ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/scontainers/container-edit.php b/admin/templates/scontainers/container-edit.php
index 40bf9e9..4016d5b 100644
--- a/admin/templates/scontainers/container-edit.php
+++ b/admin/templates/scontainers/container-edit.php
@@ -1 +1 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
diff --git a/admin/templates/scontainers/containers-list.php b/admin/templates/scontainers/containers-list.php
index d2ecb80..7a81f6c 100644
--- a/admin/templates/scontainers/containers-list.php
+++ b/admin/templates/scontainers/containers-list.php
@@ -1 +1 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/shop-attribute/attribute-edit.php b/admin/templates/shop-attribute/attribute-edit.php
index be2362b..e6b6284 100644
--- a/admin/templates/shop-attribute/attribute-edit.php
+++ b/admin/templates/shop-attribute/attribute-edit.php
@@ -1,2 +1,2 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
diff --git a/admin/templates/shop-attribute/attributes-list.php b/admin/templates/shop-attribute/attributes-list.php
index b336124..b0e03a9 100644
--- a/admin/templates/shop-attribute/attributes-list.php
+++ b/admin/templates/shop-attribute/attributes-list.php
@@ -1,2 +1,2 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/shop-attribute/values-edit.php b/admin/templates/shop-attribute/values-edit.php
index 5a8fdfa..5190a6c 100644
--- a/admin/templates/shop-attribute/values-edit.php
+++ b/admin/templates/shop-attribute/values-edit.php
@@ -38,7 +38,7 @@ if (!empty($values)) {
foreach ($values as $value) {
++$rowCounter;
$rowKey = 'existing-' . (int)($value['id'] ?? 0);
- $initialRowsHtml .= \Tpl::view('shop-attribute/_partials/value-row', [
+ $initialRowsHtml .= \Shared\Tpl\Tpl::view('shop-attribute/_partials/value-row', [
'rowKey' => $rowKey,
'value' => $value,
'languages' => $activeLanguages,
@@ -47,7 +47,7 @@ if (!empty($values)) {
}
} else {
$rowCounter = 1;
- $initialRowsHtml .= \Tpl::view('shop-attribute/_partials/value-row', [
+ $initialRowsHtml .= \Shared\Tpl\Tpl::view('shop-attribute/_partials/value-row', [
'rowKey' => 'new-1',
'value' => ['id' => 0, 'is_default' => 1, 'impact_on_the_price' => null, 'languages' => []],
'languages' => $activeLanguages,
@@ -55,7 +55,7 @@ if (!empty($values)) {
]);
}
-$newRowTemplate = \Tpl::view('shop-attribute/_partials/value-row', [
+$newRowTemplate = \Shared\Tpl\Tpl::view('shop-attribute/_partials/value-row', [
'rowKey' => '__ROW_KEY__',
'value' => ['id' => 0, 'is_default' => 0, 'impact_on_the_price' => null, 'languages' => []],
'languages' => $activeLanguages,
diff --git a/admin/templates/shop-category/categories-list.php b/admin/templates/shop-category/categories-list.php
index fb8ed8d..fb6335b 100644
--- a/admin/templates/shop-category/categories-list.php
+++ b/admin/templates/shop-category/categories-list.php
@@ -28,7 +28,7 @@ ob_start();
- = \Tpl::view( 'shop-category/subcategories-list', [
+ = \Shared\Tpl\Tpl::view( 'shop-category/subcategories-list', [
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
'level' => $this -> level + 1,
'dlang' => $this -> dlang
@@ -49,4 +49,4 @@ $gridContent = $out;
$gridPersist = false;
include __DIR__ . '/../components/grid-edit-replacement.php';
?>
-= \Tpl::view( 'shop-category/categories-list-custom-script' ); ?>
\ No newline at end of file
+= \Shared\Tpl\Tpl::view( 'shop-category/categories-list-custom-script' ); ?>
\ No newline at end of file
diff --git a/admin/templates/shop-category/category-browse-list.php b/admin/templates/shop-category/category-browse-list.php
index cb61227..cfe75c9 100644
--- a/admin/templates/shop-category/category-browse-list.php
+++ b/admin/templates/shop-category/category-browse-list.php
@@ -18,7 +18,7 @@ ob_start();
- = \Tpl::view( 'shop-category/subcategory-browse-list', [
+ = \Shared\Tpl\Tpl::view( 'shop-category/subcategory-browse-list', [
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
'level' => $this -> level + 1,
'dlang' => $this -> dlang
@@ -55,4 +55,4 @@ include __DIR__ . '/../components/grid-edit-replacement.php';
float: none;
}
-= \Tpl::view( 'shop-category/category-browse-custom-script' ); ?>
\ No newline at end of file
+= \Shared\Tpl\Tpl::view( 'shop-category/category-browse-custom-script' ); ?>
\ No newline at end of file
diff --git a/admin/templates/shop-category/category-edit.php b/admin/templates/shop-category/category-edit.php
index d906209..1c41f7d 100644
--- a/admin/templates/shop-category/category-edit.php
+++ b/admin/templates/shop-category/category-edit.php
@@ -190,5 +190,5 @@ $gridPersist = true;
include __DIR__ . '/../components/grid-edit-replacement.php';
?>
-= \Tpl::view( 'shop-category/category-edit-custom-script' ); ?>
+= \Shared\Tpl\Tpl::view( 'shop-category/category-edit-custom-script' ); ?>
diff --git a/admin/templates/shop-category/category-products.php b/admin/templates/shop-category/category-products.php
index aca888a..0b88e1e 100644
--- a/admin/templates/shop-category/category-products.php
+++ b/admin/templates/shop-category/category-products.php
@@ -27,4 +27,4 @@ $gridContent = $out;
$gridPersist = false;
include __DIR__ . '/../components/grid-edit-replacement.php';
?>
-= \Tpl::view( 'shop-category/category-products-custom-script', [ 'category_id' => $this -> category_id ] ); ?>
\ No newline at end of file
+= \Shared\Tpl\Tpl::view( 'shop-category/category-products-custom-script', [ 'category_id' => $this -> category_id ] ); ?>
\ No newline at end of file
diff --git a/admin/templates/shop-category/subcategories-list.php b/admin/templates/shop-category/subcategories-list.php
index 739fe25..a1e28b3 100644
--- a/admin/templates/shop-category/subcategories-list.php
+++ b/admin/templates/shop-category/subcategories-list.php
@@ -25,7 +25,7 @@
endif;?>
- = \Tpl::view( 'shop-category/subcategories-list', [
+ = \Shared\Tpl\Tpl::view( 'shop-category/subcategories-list', [
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
'level' => $this -> level + 1,
'dlang' => $this -> dlang
diff --git a/admin/templates/shop-category/subcategory-browse-list.php b/admin/templates/shop-category/subcategory-browse-list.php
index 1fafb54..b22fa0f 100644
--- a/admin/templates/shop-category/subcategory-browse-list.php
+++ b/admin/templates/shop-category/subcategory-browse-list.php
@@ -14,7 +14,7 @@
- = \Tpl::view( 'shop-category/subcategory-browse-list', [
+ = \Shared\Tpl\Tpl::view( 'shop-category/subcategory-browse-list', [
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
'level' => $this -> level + 1,
'dlang' => $this -> dlang
diff --git a/admin/templates/shop-clients/clients-details.php b/admin/templates/shop-clients/clients-details.php
index 6028434..fe520db 100644
--- a/admin/templates/shop-clients/clients-details.php
+++ b/admin/templates/shop-clients/clients-details.php
@@ -6,4 +6,4 @@
-= \Tpl::view('components/table-list', ['list' => $this->ordersTable]); ?>
\ No newline at end of file
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->ordersTable]); ?>
\ No newline at end of file
diff --git a/admin/templates/shop-clients/view-list.php b/admin/templates/shop-clients/view-list.php
index e5f9b0c..01a1102 100644
--- a/admin/templates/shop-clients/view-list.php
+++ b/admin/templates/shop-clients/view-list.php
@@ -1,2 +1,2 @@
Lista klientów
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
\ No newline at end of file
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
\ No newline at end of file
diff --git a/admin/templates/shop-coupon/coupon-categories-selector.php b/admin/templates/shop-coupon/coupon-categories-selector.php
index 34bda75..97227b6 100644
--- a/admin/templates/shop-coupon/coupon-categories-selector.php
+++ b/admin/templates/shop-coupon/coupon-categories-selector.php
@@ -8,7 +8,7 @@ $selectedIds = is_array($this->selectedIds ?? null) ? $this->selectedIds : [];
- = \Tpl::view('shop-coupon/coupon-categories-tree', [
+ = \Shared\Tpl\Tpl::view('shop-coupon/coupon-categories-tree', [
'categories' => $categories,
'selectedIds' => $selectedIds,
'inputName' => $inputName,
diff --git a/admin/templates/shop-coupon/coupon-categories-tree.php b/admin/templates/shop-coupon/coupon-categories-tree.php
index 5a22b24..579bf64 100644
--- a/admin/templates/shop-coupon/coupon-categories-tree.php
+++ b/admin/templates/shop-coupon/coupon-categories-tree.php
@@ -55,7 +55,7 @@ foreach ($selectedRaw as $value) {
- = \Tpl::view('shop-coupon/coupon-categories-tree', [
+ = \Shared\Tpl\Tpl::view('shop-coupon/coupon-categories-tree', [
'categories' => $children,
'selectedIds' => array_keys($selected),
'inputName' => $inputName,
diff --git a/admin/templates/shop-coupon/coupon-edit-new.php b/admin/templates/shop-coupon/coupon-edit-new.php
index 06f6ba8..a4d8c3c 100644
--- a/admin/templates/shop-coupon/coupon-edit-new.php
+++ b/admin/templates/shop-coupon/coupon-edit-new.php
@@ -1,3 +1,3 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
-= \Tpl::view('shop-coupon/coupon-edit-custom-script'); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('shop-coupon/coupon-edit-custom-script'); ?>
diff --git a/admin/templates/shop-coupon/coupons-list.php b/admin/templates/shop-coupon/coupons-list.php
index b336124..b0e03a9 100644
--- a/admin/templates/shop-coupon/coupons-list.php
+++ b/admin/templates/shop-coupon/coupons-list.php
@@ -1,2 +1,2 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/shop-order/order-details.php b/admin/templates/shop-order/order-details.php
index 0effba4..dd69a34 100644
--- a/admin/templates/shop-order/order-details.php
+++ b/admin/templates/shop-order/order-details.php
@@ -217,7 +217,7 @@ $orderId = (int)($this -> order['id'] ?? 0);
= $this -> order['trustmate_send'] ? 'Odznacz zamówienie jako wysłane do trustmate.io' : 'Zaznacz zamówienie jako wysłane do trustmate.io';?>
-= \Tpl::view('shop-order/order-details-custom-script', [
+= \Shared\Tpl\Tpl::view('shop-order/order-details-custom-script', [
'order_id' => $orderId,
'trustmate_send' => (int)($this -> order['trustmate_send'] ?? 0),
]);?>
\ No newline at end of file
diff --git a/admin/templates/shop-order/order-edit.php b/admin/templates/shop-order/order-edit.php
index c6f92f2..a45295a 100644
--- a/admin/templates/shop-order/order-edit.php
+++ b/admin/templates/shop-order/order-edit.php
@@ -222,4 +222,4 @@ $orderId = (int)($this -> order['id'] ?? 0);
-= \Tpl::view('shop-order/order-edit-custom-script');?>
\ No newline at end of file
+= \Shared\Tpl\Tpl::view('shop-order/order-edit-custom-script');?>
\ No newline at end of file
diff --git a/admin/templates/shop-order/orders-list.php b/admin/templates/shop-order/orders-list.php
index 8c5ebbe..a28e805 100644
--- a/admin/templates/shop-order/orders-list.php
+++ b/admin/templates/shop-order/orders-list.php
@@ -1,2 +1,2 @@
Lista zamówień
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/shop-payment-method/payment-method-edit.php b/admin/templates/shop-payment-method/payment-method-edit.php
index 5fe1611..d92a9df 100644
--- a/admin/templates/shop-payment-method/payment-method-edit.php
+++ b/admin/templates/shop-payment-method/payment-method-edit.php
@@ -1 +1 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
diff --git a/admin/templates/shop-payment-method/payment-methods-list.php b/admin/templates/shop-payment-method/payment-methods-list.php
index 0f89c5b..8836268 100644
--- a/admin/templates/shop-payment-method/payment-methods-list.php
+++ b/admin/templates/shop-payment-method/payment-methods-list.php
@@ -1 +1 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/shop-producer/producer-edit.php b/admin/templates/shop-producer/producer-edit.php
index 5fe1611..d92a9df 100644
--- a/admin/templates/shop-producer/producer-edit.php
+++ b/admin/templates/shop-producer/producer-edit.php
@@ -1 +1 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
diff --git a/admin/templates/shop-producer/producers-list.php b/admin/templates/shop-producer/producers-list.php
index 0f89c5b..8836268 100644
--- a/admin/templates/shop-producer/producers-list.php
+++ b/admin/templates/shop-producer/producers-list.php
@@ -1 +1 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/shop-product-sets/product-set-edit.php b/admin/templates/shop-product-sets/product-set-edit.php
index 557b0ac..a669c3c 100644
--- a/admin/templates/shop-product-sets/product-set-edit.php
+++ b/admin/templates/shop-product-sets/product-set-edit.php
@@ -1,2 +1,2 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
-= \Tpl::view('shop-product-sets/product-set-edit-custom-script'); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('shop-product-sets/product-set-edit-custom-script'); ?>
diff --git a/admin/templates/shop-product-sets/product-sets-list.php b/admin/templates/shop-product-sets/product-sets-list.php
index 0f89c5b..8836268 100644
--- a/admin/templates/shop-product-sets/product-sets-list.php
+++ b/admin/templates/shop-product-sets/product-sets-list.php
@@ -1 +1 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/shop-product/mass-edit.php b/admin/templates/shop-product/mass-edit.php
index 0823132..a3e3b60 100644
--- a/admin/templates/shop-product/mass-edit.php
+++ b/admin/templates/shop-product/mass-edit.php
@@ -96,7 +96,7 @@
= $category['languages'][$this->dlang]['title']; ?>
- = \Tpl::view( 'shop-product/subcategories-list', [
+ = \Shared\Tpl\Tpl::view( 'shop-product/subcategories-list', [
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category['id'] ),
'level' => ($this->level ?? 0) + 1,
'dlang' => $this->dlang,
@@ -111,4 +111,4 @@
-= \Tpl::view( 'shop-product/mass-edit-custom-script' ); ?>
+= \Shared\Tpl\Tpl::view( 'shop-product/mass-edit-custom-script' ); ?>
diff --git a/admin/templates/shop-product/product-edit.php b/admin/templates/shop-product/product-edit.php
index 30a07cc..b2bb2fd 100644
--- a/admin/templates/shop-product/product-edit.php
+++ b/admin/templates/shop-product/product-edit.php
@@ -1,5 +1,5 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
-= \Tpl::view('shop-product/product-edit-custom-script', [
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('shop-product/product-edit-custom-script', [
'product' => $this->product,
'user' => $this->user,
'languages' => $this->form->languages ?? []
diff --git a/admin/templates/shop-product/products-list.php b/admin/templates/shop-product/products-list.php
index db59fe1..3ad71e7 100644
--- a/admin/templates/shop-product/products-list.php
+++ b/admin/templates/shop-product/products-list.php
@@ -1,7 +1,7 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
viewModel->customScriptView)): ?>
- = \Tpl::view($this->viewModel->customScriptView, [
+ = \Shared\Tpl\Tpl::view($this->viewModel->customScriptView, [
'list' => $this->viewModel,
'apilo_enabled' => $this->apilo_enabled,
'shoppro_enabled' => $this->shoppro_enabled,
diff --git a/admin/templates/shop-product/subcategories-list.php b/admin/templates/shop-product/subcategories-list.php
index 5c7f796..ba0d672 100644
--- a/admin/templates/shop-product/subcategories-list.php
+++ b/admin/templates/shop-product/subcategories-list.php
@@ -11,7 +11,7 @@
= $category[ 'languages' ][ $this -> dlang ][ 'title' ];?>
=
- \Tpl::view( 'shop-product/subcategories-list', [
+ \Shared\Tpl\Tpl::view( 'shop-product/subcategories-list', [
'categories' => ( new \Domain\Category\CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $category[ 'id' ] ),
'product_categories' => $this -> product_categories,
'dlang' => $this -> dlang,
diff --git a/admin/templates/shop-promotion/promotion-categories-selector.php b/admin/templates/shop-promotion/promotion-categories-selector.php
index 88652ae..1750888 100644
--- a/admin/templates/shop-promotion/promotion-categories-selector.php
+++ b/admin/templates/shop-promotion/promotion-categories-selector.php
@@ -8,7 +8,7 @@ $selectedIds = is_array($this->selectedIds ?? null) ? $this->selectedIds : [];
- = \Tpl::view('shop-promotion/promotion-categories-tree', [
+ = \Shared\Tpl\Tpl::view('shop-promotion/promotion-categories-tree', [
'categories' => $categories,
'selectedIds' => $selectedIds,
'inputName' => $inputName,
diff --git a/admin/templates/shop-promotion/promotion-categories-tree.php b/admin/templates/shop-promotion/promotion-categories-tree.php
index 34114f4..0d70355 100644
--- a/admin/templates/shop-promotion/promotion-categories-tree.php
+++ b/admin/templates/shop-promotion/promotion-categories-tree.php
@@ -55,7 +55,7 @@ foreach ($selectedRaw as $value) {
- = \Tpl::view('shop-promotion/promotion-categories-tree', [
+ = \Shared\Tpl\Tpl::view('shop-promotion/promotion-categories-tree', [
'categories' => $children,
'selectedIds' => array_keys($selected),
'inputName' => $inputName,
diff --git a/admin/templates/shop-promotion/promotion-edit.php b/admin/templates/shop-promotion/promotion-edit.php
index 1b557e2..e8d9fc9 100644
--- a/admin/templates/shop-promotion/promotion-edit.php
+++ b/admin/templates/shop-promotion/promotion-edit.php
@@ -1,3 +1,3 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
-= \Tpl::view('shop-promotion/promotion-edit-custom-script'); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('shop-promotion/promotion-edit-custom-script'); ?>
diff --git a/admin/templates/shop-promotion/promotions-list.php b/admin/templates/shop-promotion/promotions-list.php
index b336124..b0e03a9 100644
--- a/admin/templates/shop-promotion/promotions-list.php
+++ b/admin/templates/shop-promotion/promotions-list.php
@@ -1,2 +1,2 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/shop-statuses/status-edit.php b/admin/templates/shop-statuses/status-edit.php
index 5fe1611..d92a9df 100644
--- a/admin/templates/shop-statuses/status-edit.php
+++ b/admin/templates/shop-statuses/status-edit.php
@@ -1 +1 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
diff --git a/admin/templates/shop-statuses/view-list.php b/admin/templates/shop-statuses/view-list.php
index 0f89c5b..8836268 100644
--- a/admin/templates/shop-statuses/view-list.php
+++ b/admin/templates/shop-statuses/view-list.php
@@ -1 +1 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/shop-transport/transport-edit.php b/admin/templates/shop-transport/transport-edit.php
index 2f0eeee..d7ef592 100644
--- a/admin/templates/shop-transport/transport-edit.php
+++ b/admin/templates/shop-transport/transport-edit.php
@@ -1,8 +1,8 @@
$this->form,
]);
-echo \Tpl::view('shop-transport/transport-edit-custom-script', [
+echo \Shared\Tpl\Tpl::view('shop-transport/transport-edit-custom-script', [
'form' => $this->form,
]);
diff --git a/admin/templates/shop-transport/transports-list.php b/admin/templates/shop-transport/transports-list.php
index 0f89c5b..8836268 100644
--- a/admin/templates/shop-transport/transports-list.php
+++ b/admin/templates/shop-transport/transports-list.php
@@ -1 +1 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/admin/templates/users/user-edit.php b/admin/templates/users/user-edit.php
index be2362b..e6b6284 100644
--- a/admin/templates/users/user-edit.php
+++ b/admin/templates/users/user-edit.php
@@ -1,2 +1,2 @@
-= \Tpl::view('components/form-edit', ['form' => $this->form]); ?>
+= \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $this->form]); ?>
diff --git a/admin/templates/users/users-list.php b/admin/templates/users/users-list.php
index b336124..b0e03a9 100644
--- a/admin/templates/users/users-list.php
+++ b/admin/templates/users/users-list.php
@@ -1,2 +1,2 @@
-= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
+= \Shared\Tpl\Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>
diff --git a/autoload/Shared/Html/Html.php b/autoload/Shared/Html/Html.php
index 2bec458..3ee98ac 100644
--- a/autoload/Shared/Html/Html.php
+++ b/autoload/Shared/Html/Html.php
@@ -5,21 +5,21 @@ class Html
{
public static function form_text( array $params = array() )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> params = $params;
return $tpl -> render( 'html/form-text' );
}
public static function input_switch( array $params = array() )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> params = $params;
return $tpl -> render( 'html/input-switch' );
}
public static function select( array $params = array() )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> params = $params;
return $tpl -> render( 'html/select' );
}
@@ -32,7 +32,7 @@ class Html
$params = array_merge( $defaults, $params );
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> params = $params;
return $tpl -> render( 'html/textarea' );
}
@@ -45,7 +45,7 @@ class Html
$params = array_merge( $defaults, $params );
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> params = $params;
return $tpl -> render( 'html/input-icon' );
}
@@ -58,7 +58,7 @@ class Html
$params = array_merge( $defaults, $params );
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> params = $params;
return $tpl -> render( 'html/input' );
}
@@ -71,7 +71,7 @@ class Html
$params = array_merge( $defaults, $params );
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> params = $params;
return $tpl -> render( 'html/button' );
}
@@ -86,7 +86,7 @@ class Html
$params = array_merge( $defaults, $params );
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> params = $params;
return $tpl -> render( 'html/panel' );
}
diff --git a/autoload/Shared/Tpl/Tpl.php b/autoload/Shared/Tpl/Tpl.php
new file mode 100644
index 0000000..091c982
--- /dev/null
+++ b/autoload/Shared/Tpl/Tpl.php
@@ -0,0 +1,63 @@
+ $val)
+ $tpl->$key = $val;
+ return $tpl->render($file);
+ }
+
+ public function secureHTML($val)
+ {
+ $out = stripslashes($val);
+ $out = str_replace("'", "'", $out);
+ $out = str_replace('"', """, $out);
+ $out = str_replace("<", "<", $out);
+ $out = str_replace(">", ">", $out);
+ return $out;
+ }
+
+ public function render($file)
+ {
+ $paths = [
+ 'templates_user/' . $file . '.php',
+ 'templates/' . $file . '.php',
+ '../templates_user/' . $file . '.php',
+ '../templates/' . $file . '.php',
+ $file . '.php',
+ ];
+
+ foreach ($paths as $path) {
+ if (file_exists($path)) {
+ return $this->renderFile($path);
+ }
+ }
+
+ return '
Nie znaleziono pliku widoku: ' . $file . '.php';
+ }
+
+ private function renderFile($path)
+ {
+ ob_start();
+ include $path;
+ $out = ob_get_contents();
+ ob_end_clean();
+ return $out;
+ }
+
+ public function __set($name, $value)
+ {
+ $this->vars[$name] = $value;
+ }
+
+ public function __get($name)
+ {
+ return $this->vars[$name];
+ }
+}
diff --git a/autoload/admin/App.php b/autoload/admin/App.php
index e5a4dad..430ebba 100644
--- a/autoload/admin/App.php
+++ b/autoload/admin/App.php
@@ -171,7 +171,7 @@ class App
return $controller->login_form();
}
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl->content = self::route();
return $tpl->render( 'site/main-layout' );
}
diff --git a/autoload/admin/Controllers/ArticlesArchiveController.php b/autoload/admin/Controllers/ArticlesArchiveController.php
index 8af8513..219a132 100644
--- a/autoload/admin/Controllers/ArticlesArchiveController.php
+++ b/autoload/admin/Controllers/ArticlesArchiveController.php
@@ -105,7 +105,7 @@ class ArticlesArchiveController
'Brak danych w tabeli.'
);
- return \Tpl::view('articles/articles-archive-list', [
+ return \Shared\Tpl\Tpl::view('articles/articles-archive-list', [
'viewModel' => $viewModel,
]);
}
diff --git a/autoload/admin/Controllers/ArticlesController.php b/autoload/admin/Controllers/ArticlesController.php
index 9ba19ff..90f66ef 100644
--- a/autoload/admin/Controllers/ArticlesController.php
+++ b/autoload/admin/Controllers/ArticlesController.php
@@ -146,7 +146,7 @@ class ArticlesController
'Dodaj artykul'
);
- return \Tpl::view('articles/articles-list', [
+ return \Shared\Tpl\Tpl::view('articles/articles-list', [
'viewModel' => $viewModel,
]);
}
@@ -289,7 +289,7 @@ class ArticlesController
$viewModel = $this->buildFormViewModel($article, $languages, $menus, $layouts);
- return \Tpl::view('articles/article-edit', [
+ return \Shared\Tpl\Tpl::view('articles/article-edit', [
'form' => $viewModel,
'article' => $article,
'user' => $user,
@@ -444,7 +444,7 @@ class ArticlesController
. ''
. 'Menu: ' . $menuName . '';
$html .= '
';
- $html .= \Tpl::view('articles/subpages-list', [
+ $html .= \Shared\Tpl\Tpl::view('articles/subpages-list', [
'pages' => $menuPages,
'article_pages' => $article['pages'] ?? [],
'parent_id' => $menuId,
diff --git a/autoload/admin/Controllers/BannerController.php b/autoload/admin/Controllers/BannerController.php
index e78819b..28eeadb 100644
--- a/autoload/admin/Controllers/BannerController.php
+++ b/autoload/admin/Controllers/BannerController.php
@@ -154,7 +154,7 @@ class BannerController
'banners/banners-list-custom-script'
);
- return \Tpl::view('banners/banners-list', [
+ return \Shared\Tpl\Tpl::view('banners/banners-list', [
'viewModel' => $viewModel,
]);
}
@@ -176,7 +176,7 @@ class BannerController
$viewModel = $this->buildFormViewModel($banner, $languages, $validationErrors);
- return \Tpl::view('components/form-edit', ['form' => $viewModel]);
+ return \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $viewModel]);
}
/**
diff --git a/autoload/admin/Controllers/DashboardController.php b/autoload/admin/Controllers/DashboardController.php
index 9ec086a..6f52895 100644
--- a/autoload/admin/Controllers/DashboardController.php
+++ b/autoload/admin/Controllers/DashboardController.php
@@ -17,7 +17,7 @@ class DashboardController
public function main_view(): string
{
- return \Tpl::view( 'dashboard/main-view', [
+ return \Shared\Tpl\Tpl::view( 'dashboard/main-view', [
'last_orders' => $this->repository->lastOrders(),
'order_statuses' => $this->statusesRepository->allStatuses(),
'sales' => $this->repository->last24MonthsSales(),
diff --git a/autoload/admin/Controllers/DictionariesController.php b/autoload/admin/Controllers/DictionariesController.php
index 44a5fce..012ccee 100644
--- a/autoload/admin/Controllers/DictionariesController.php
+++ b/autoload/admin/Controllers/DictionariesController.php
@@ -111,7 +111,7 @@ class DictionariesController
'Dodaj jednostke miary'
);
- return \Tpl::view('dictionaries/units-list', [
+ return \Shared\Tpl\Tpl::view('dictionaries/units-list', [
'viewModel' => $viewModel,
]);
}
@@ -129,7 +129,7 @@ class DictionariesController
$viewModel = $this->buildFormViewModel($unit, $languages, $validationErrors);
- return \Tpl::view('dictionaries/unit-edit', ['form' => $viewModel]);
+ return \Shared\Tpl\Tpl::view('dictionaries/unit-edit', ['form' => $viewModel]);
}
public function save(): void
diff --git a/autoload/admin/Controllers/FilemanagerController.php b/autoload/admin/Controllers/FilemanagerController.php
index ba2535e..2302801 100644
--- a/autoload/admin/Controllers/FilemanagerController.php
+++ b/autoload/admin/Controllers/FilemanagerController.php
@@ -11,7 +11,7 @@ class FilemanagerController
$akey = $this->ensureFilemanagerAccessKey();
$filemanagerUrl = $this->buildFilemanagerUrl($akey);
- return \Tpl::view('filemanager/filemanager', [
+ return \Shared\Tpl\Tpl::view('filemanager/filemanager', [
'filemanager_url' => $filemanagerUrl,
]);
}
diff --git a/autoload/admin/Controllers/IntegrationsController.php b/autoload/admin/Controllers/IntegrationsController.php
index d55657a..29d6888 100644
--- a/autoload/admin/Controllers/IntegrationsController.php
+++ b/autoload/admin/Controllers/IntegrationsController.php
@@ -14,7 +14,7 @@ class IntegrationsController
public function apilo_settings(): string
{
- return \Tpl::view( 'integrations/apilo-settings', [
+ return \Shared\Tpl\Tpl::view( 'integrations/apilo-settings', [
'settings' => $this->repository->getSettings( 'apilo' ),
'apilo_status' => $this->repository->apiloIntegrationStatus(),
] );
@@ -127,7 +127,7 @@ class IntegrationsController
public function shoppro_settings(): string
{
- return \Tpl::view( 'integrations/shoppro-settings', [
+ return \Shared\Tpl\Tpl::view( 'integrations/shoppro-settings', [
'settings' => $this->repository->getSettings( 'shoppro' ),
] );
}
diff --git a/autoload/admin/Controllers/LanguagesController.php b/autoload/admin/Controllers/LanguagesController.php
index 0f56074..5c013ae 100644
--- a/autoload/admin/Controllers/LanguagesController.php
+++ b/autoload/admin/Controllers/LanguagesController.php
@@ -131,7 +131,7 @@ class LanguagesController
'Dodaj jezyk'
);
- return \Tpl::view('languages/languages-list', [
+ return \Shared\Tpl\Tpl::view('languages/languages-list', [
'viewModel' => $viewModel,
]);
}
@@ -150,7 +150,7 @@ class LanguagesController
unset($_SESSION['form_errors'][$this->getLanguageFormId()]);
}
- return \Tpl::view('languages/language-edit', [
+ return \Shared\Tpl\Tpl::view('languages/language-edit', [
'form' => $this->buildLanguageFormViewModel($language, $this->repository->maxOrder(), $validationErrors),
]);
}
@@ -324,7 +324,7 @@ class LanguagesController
'Dodaj tlumaczenie'
);
- return \Tpl::view('languages/translations-list', [
+ return \Shared\Tpl\Tpl::view('languages/translations-list', [
'viewModel' => $viewModel,
]);
}
@@ -339,7 +339,7 @@ class LanguagesController
unset($_SESSION['form_errors'][$this->getTranslationFormId()]);
}
- return \Tpl::view('languages/translation-edit', [
+ return \Shared\Tpl\Tpl::view('languages/translation-edit', [
'form' => $this->buildTranslationFormViewModel($translation, $languages, $validationErrors),
]);
}
diff --git a/autoload/admin/Controllers/LayoutsController.php b/autoload/admin/Controllers/LayoutsController.php
index f86e838..6b6fb75 100644
--- a/autoload/admin/Controllers/LayoutsController.php
+++ b/autoload/admin/Controllers/LayoutsController.php
@@ -128,14 +128,14 @@ class LayoutsController
'Dodaj szablon'
);
- return \Tpl::view('layouts/layouts-list', [
+ return \Shared\Tpl\Tpl::view('layouts/layouts-list', [
'viewModel' => $viewModel,
]);
}
public function edit(): string
{
- return \Tpl::view('layouts/layout-edit', [
+ return \Shared\Tpl\Tpl::view('layouts/layout-edit', [
'layout' => $this->repository->find((int)\Shared\Helpers\Helpers::get('id')),
'menus' => $this->repository->menusWithPages(),
'categories' => $this->repository->categoriesTree(),
diff --git a/autoload/admin/Controllers/NewsletterController.php b/autoload/admin/Controllers/NewsletterController.php
index a0be827..cf35ee6 100644
--- a/autoload/admin/Controllers/NewsletterController.php
+++ b/autoload/admin/Controllers/NewsletterController.php
@@ -126,7 +126,7 @@ class NewsletterController
'Brak danych w tabeli.'
);
- return \Tpl::view('newsletter/emails-list', [
+ return \Shared\Tpl\Tpl::view('newsletter/emails-list', [
'viewModel' => $viewModel,
]);
}
@@ -173,7 +173,7 @@ class NewsletterController
unset($_SESSION['form_errors'][$this->settingsFormId()]);
}
- return \Tpl::view('newsletter/settings', [
+ return \Shared\Tpl\Tpl::view('newsletter/settings', [
'form' => $this->buildSettingsFormViewModel($settings, $validationErrors),
]);
}
@@ -223,7 +223,7 @@ class NewsletterController
public function email_templates_admin(): string
{
$viewModel = $this->templatesListViewModel();
- return \Tpl::view('newsletter/email-templates-admin', [
+ return \Shared\Tpl\Tpl::view('newsletter/email-templates-admin', [
'viewModel' => $viewModel,
]);
}
@@ -243,7 +243,7 @@ class NewsletterController
unset($_SESSION['form_errors'][$formId]);
}
- return \Tpl::view('newsletter/email-template-edit', [
+ return \Shared\Tpl\Tpl::view('newsletter/email-template-edit', [
'form' => $this->buildTemplateFormViewModel($template, $validationErrors),
]);
}
diff --git a/autoload/admin/Controllers/PagesController.php b/autoload/admin/Controllers/PagesController.php
index 6e665ac..c97225e 100644
--- a/autoload/admin/Controllers/PagesController.php
+++ b/autoload/admin/Controllers/PagesController.php
@@ -27,7 +27,7 @@ class PagesController
public function list(): string
{
- return \Tpl::view('pages/pages-list', [
+ return \Shared\Tpl\Tpl::view('pages/pages-list', [
'menus' => $this->repository->menusWithPages(),
'cookie_pages' => $this->cookieState('cookie_pages'),
'cookie_menus' => $this->cookieState('cookie_menus'),
@@ -43,7 +43,7 @@ class PagesController
$menus[$index]['pages'] = $this->withPreviewUrls($menu['pages'] ?? [], $defaultLanguage);
}
- return \Tpl::view('pages/pages-browse-list', [
+ return \Shared\Tpl\Tpl::view('pages/pages-browse-list', [
'menus' => $menus,
'modal' => \Shared\Helpers\Helpers::get('modal'),
'cookie_pages' => $this->cookieState('cookie_pages'),
@@ -60,7 +60,7 @@ class PagesController
{
$menu = $this->repository->menuDetails((int)\Shared\Helpers\Helpers::get('id'));
- return \Tpl::view('pages/menu-edit', [
+ return \Shared\Tpl\Tpl::view('pages/menu-edit', [
'form' => $this->buildMenuFormViewModel($menu),
]);
}
@@ -174,7 +174,7 @@ class PagesController
$layouts = $this->layoutsRepository->listAll();
$languages = $this->languagesRepository->languagesList();
- return \Tpl::view('pages/page-edit', [
+ return \Shared\Tpl\Tpl::view('pages/page-edit', [
'form' => $this->buildPageFormViewModel(
$page,
$parentId,
@@ -537,7 +537,7 @@ class PagesController
public function pageArticles(): string
{
$pageId = (int)\Shared\Helpers\Helpers::get('id');
- return \Tpl::view('pages/page-articles', [
+ return \Shared\Tpl\Tpl::view('pages/page-articles', [
'page_id' => $pageId,
'articles' => $this->repository->pageArticles($pageId),
]);
diff --git a/autoload/admin/Controllers/ProductArchiveController.php b/autoload/admin/Controllers/ProductArchiveController.php
index d470946..a10a085 100644
--- a/autoload/admin/Controllers/ProductArchiveController.php
+++ b/autoload/admin/Controllers/ProductArchiveController.php
@@ -147,7 +147,7 @@ class ProductArchiveController
'product-archive/products-list-custom-script'
);
- return \Tpl::view('product-archive/products-list', [
+ return \Shared\Tpl\Tpl::view('product-archive/products-list', [
'viewModel' => $viewModel,
]);
}
diff --git a/autoload/admin/Controllers/ScontainersController.php b/autoload/admin/Controllers/ScontainersController.php
index 1af3139..b390d2f 100644
--- a/autoload/admin/Controllers/ScontainersController.php
+++ b/autoload/admin/Controllers/ScontainersController.php
@@ -125,7 +125,7 @@ class ScontainersController
'Dodaj kontener'
);
- return \Tpl::view('scontainers/containers-list', [
+ return \Shared\Tpl\Tpl::view('scontainers/containers-list', [
'viewModel' => $viewModel,
]);
}
@@ -144,7 +144,7 @@ class ScontainersController
unset($_SESSION['form_errors'][$this->formId()]);
}
- return \Tpl::view('scontainers/container-edit', [
+ return \Shared\Tpl\Tpl::view('scontainers/container-edit', [
'form' => $this->buildFormViewModel($container, $languages, $validationErrors),
]);
}
diff --git a/autoload/admin/Controllers/SettingsController.php b/autoload/admin/Controllers/SettingsController.php
index 90d6017..d148966 100644
--- a/autoload/admin/Controllers/SettingsController.php
+++ b/autoload/admin/Controllers/SettingsController.php
@@ -279,7 +279,7 @@ class SettingsController
$viewModel = $this->buildFormViewModel($settings, $languages, $validationErrors);
- return \Tpl::view('components/form-edit', ['form' => $viewModel]);
+ return \Shared\Tpl\Tpl::view('components/form-edit', ['form' => $viewModel]);
}
private function buildFormViewModel(array $settings, array $languages, ?array $errors = null): FormEditViewModel
diff --git a/autoload/admin/Controllers/ShopAttributeController.php b/autoload/admin/Controllers/ShopAttributeController.php
index e21150d..3eb2b65 100644
--- a/autoload/admin/Controllers/ShopAttributeController.php
+++ b/autoload/admin/Controllers/ShopAttributeController.php
@@ -143,7 +143,7 @@ class ShopAttributeController
'Dodaj ceche'
);
- return \Tpl::view('shop-attribute/attributes-list', [
+ return \Shared\Tpl\Tpl::view('shop-attribute/attributes-list', [
'viewModel' => $viewModel,
]);
}
@@ -153,7 +153,7 @@ class ShopAttributeController
$attribute = $this->repository->findAttribute((int)\Shared\Helpers\Helpers::get('id'));
$languages = $this->languagesRepository->languagesList();
- return \Tpl::view('shop-attribute/attribute-edit', [
+ return \Shared\Tpl\Tpl::view('shop-attribute/attribute-edit', [
'form' => $this->buildFormViewModel($attribute, $languages),
]);
}
@@ -236,7 +236,7 @@ class ShopAttributeController
$languages = $this->languagesRepository->languagesList();
- return \Tpl::view('shop-attribute/values-edit', [
+ return \Shared\Tpl\Tpl::view('shop-attribute/values-edit', [
'attribute' => $attribute,
'values' => $this->repository->findValues($attributeId),
'languages' => $languages,
@@ -318,7 +318,7 @@ class ShopAttributeController
$rowKey = 'new-' . time();
}
- $html = \Tpl::view('shop-attribute/_partials/value-row', [
+ $html = \Shared\Tpl\Tpl::view('shop-attribute/_partials/value-row', [
'rowKey' => $rowKey,
'value' => ['id' => 0, 'is_default' => 0, 'impact_on_the_price' => null, 'languages' => []],
'languages' => $this->languagesRepository->languagesList(),
diff --git a/autoload/admin/Controllers/ShopCategoryController.php b/autoload/admin/Controllers/ShopCategoryController.php
index cea21c4..d489a1c 100644
--- a/autoload/admin/Controllers/ShopCategoryController.php
+++ b/autoload/admin/Controllers/ShopCategoryController.php
@@ -17,7 +17,7 @@ class ShopCategoryController
public function view_list(): string
{
- return \Tpl::view('shop-category/categories-list', [
+ return \Shared\Tpl\Tpl::view('shop-category/categories-list', [
'categories' => $this->repository->subcategories(null),
'level' => 0,
'dlang' => $this->languagesRepository->defaultLanguage(),
@@ -31,7 +31,7 @@ class ShopCategoryController
public function category_edit(): string
{
- return \Tpl::view('shop-category/category-edit', [
+ return \Shared\Tpl\Tpl::view('shop-category/category-edit', [
'category' => $this->repository->categoryDetails(\Shared\Helpers\Helpers::get('id')),
'pid' => \Shared\Helpers\Helpers::get('pid'),
'languages' => $this->languagesRepository->languagesList(),
@@ -87,7 +87,7 @@ class ShopCategoryController
public function category_products(): string
{
- return \Tpl::view('shop-category/category-products', [
+ return \Shared\Tpl\Tpl::view('shop-category/category-products', [
'category_id' => \Shared\Helpers\Helpers::get('id'),
'products' => $this->repository->categoryProducts((int)\Shared\Helpers\Helpers::get('id')),
]);
@@ -100,7 +100,7 @@ class ShopCategoryController
public function category_url_browser(): void
{
- echo \Tpl::view('shop-category/category-browse-list', [
+ echo \Shared\Tpl\Tpl::view('shop-category/category-browse-list', [
'categories' => $this->repository->subcategories(null),
'level' => 0,
'dlang' => $this->languagesRepository->defaultLanguage(),
diff --git a/autoload/admin/Controllers/ShopClientsController.php b/autoload/admin/Controllers/ShopClientsController.php
index 2072c86..5917ea4 100644
--- a/autoload/admin/Controllers/ShopClientsController.php
+++ b/autoload/admin/Controllers/ShopClientsController.php
@@ -143,7 +143,7 @@ class ShopClientsController
'Brak danych w tabeli.'
);
- return \Tpl::view('shop-clients/view-list', [
+ return \Shared\Tpl\Tpl::view('shop-clients/view-list', [
'viewModel' => $viewModel,
]);
}
@@ -205,7 +205,7 @@ class ShopClientsController
'Brak zamowien klienta.'
);
- return \Tpl::view('shop-clients/clients-details', [
+ return \Shared\Tpl\Tpl::view('shop-clients/clients-details', [
'name' => $name,
'surname' => $surname,
'email' => $email,
diff --git a/autoload/admin/Controllers/ShopCouponController.php b/autoload/admin/Controllers/ShopCouponController.php
index 1a68697..d0536ad 100644
--- a/autoload/admin/Controllers/ShopCouponController.php
+++ b/autoload/admin/Controllers/ShopCouponController.php
@@ -160,7 +160,7 @@ class ShopCouponController
'Dodaj kupon'
);
- return \Tpl::view('shop-coupon/coupons-list', [
+ return \Shared\Tpl\Tpl::view('shop-coupon/coupons-list', [
'viewModel' => $viewModel,
]);
}
@@ -175,7 +175,7 @@ class ShopCouponController
$coupon = $this->repository->find((int)\Shared\Helpers\Helpers::get('id'));
$categories = $this->repository->categoriesTree(null);
- return \Tpl::view('shop-coupon/coupon-edit-new', [
+ return \Shared\Tpl\Tpl::view('shop-coupon/coupon-edit-new', [
'form' => $this->buildFormViewModel($coupon, $categories),
]);
}
@@ -315,7 +315,7 @@ class ShopCouponController
'label' => 'Dotyczy rowniez produktow przecenionych',
'tab' => 'settings',
]),
- FormField::custom('coupon_categories', \Tpl::view('shop-coupon/coupon-categories-selector', [
+ FormField::custom('coupon_categories', \Shared\Tpl\Tpl::view('shop-coupon/coupon-categories-selector', [
'label' => 'Ogranicz promocje do wybranych kategorii',
'inputName' => 'categories[]',
'categories' => $categories,
diff --git a/autoload/admin/Controllers/ShopOrderController.php b/autoload/admin/Controllers/ShopOrderController.php
index 3af5f11..63baae5 100644
--- a/autoload/admin/Controllers/ShopOrderController.php
+++ b/autoload/admin/Controllers/ShopOrderController.php
@@ -150,7 +150,7 @@ class ShopOrderController
'Brak danych w tabeli.'
);
- return \Tpl::view('shop-order/orders-list', [
+ return \Shared\Tpl\Tpl::view('shop-order/orders-list', [
'viewModel' => $viewModel,
]);
}
@@ -170,7 +170,7 @@ class ShopOrderController
$coupon = new \shop\Coupon((int)$order['coupon_id']);
}
- return \Tpl::view('shop-order/order-details', [
+ return \Shared\Tpl\Tpl::view('shop-order/order-details', [
'order' => $order,
'coupon' => $coupon,
'order_statuses' => $this->service->statuses(),
@@ -188,7 +188,7 @@ class ShopOrderController
{
$orderId = (int)\Shared\Helpers\Helpers::get('order_id');
- return \Tpl::view('shop-order/order-edit', [
+ return \Shared\Tpl\Tpl::view('shop-order/order-edit', [
'order' => $this->service->details($orderId),
'order_statuses' => $this->service->statuses(),
'transport' => \shop\Transport::transport_list(),
diff --git a/autoload/admin/Controllers/ShopPaymentMethodController.php b/autoload/admin/Controllers/ShopPaymentMethodController.php
index 02e4d0c..4255acd 100644
--- a/autoload/admin/Controllers/ShopPaymentMethodController.php
+++ b/autoload/admin/Controllers/ShopPaymentMethodController.php
@@ -124,7 +124,7 @@ class ShopPaymentMethodController
'Brak danych w tabeli.'
);
- return \Tpl::view('shop-payment-method/payment-methods-list', [
+ return \Shared\Tpl\Tpl::view('shop-payment-method/payment-methods-list', [
'viewModel' => $viewModel,
]);
}
@@ -138,7 +138,7 @@ class ShopPaymentMethodController
exit;
}
- return \Tpl::view('shop-payment-method/payment-method-edit', [
+ return \Shared\Tpl\Tpl::view('shop-payment-method/payment-method-edit', [
'form' => $this->buildFormViewModel($paymentMethod, $this->getApiloPaymentTypes()),
]);
}
diff --git a/autoload/admin/Controllers/ShopProducerController.php b/autoload/admin/Controllers/ShopProducerController.php
index 7656eb3..8259aa3 100644
--- a/autoload/admin/Controllers/ShopProducerController.php
+++ b/autoload/admin/Controllers/ShopProducerController.php
@@ -134,7 +134,7 @@ class ShopProducerController
'Dodaj producenta'
);
- return \Tpl::view('shop-producer/producers-list', [
+ return \Shared\Tpl\Tpl::view('shop-producer/producers-list', [
'viewModel' => $viewModel,
]);
}
@@ -153,7 +153,7 @@ class ShopProducerController
unset($_SESSION['form_errors'][$this->formId()]);
}
- return \Tpl::view('shop-producer/producer-edit', [
+ return \Shared\Tpl\Tpl::view('shop-producer/producer-edit', [
'form' => $this->buildFormViewModel($producer, $languages, $validationErrors),
]);
}
diff --git a/autoload/admin/Controllers/ShopProductController.php b/autoload/admin/Controllers/ShopProductController.php
index 916cbea..da98388 100644
--- a/autoload/admin/Controllers/ShopProductController.php
+++ b/autoload/admin/Controllers/ShopProductController.php
@@ -190,7 +190,7 @@ class ShopProductController
'shop-product/products-list-custom-script'
);
- return \Tpl::view( 'shop-product/products-list', [
+ return \Shared\Tpl\Tpl::view( 'shop-product/products-list', [
'viewModel' => $viewModel,
'apilo_enabled' => $apiloEnabled,
'shoppro_enabled' => $shopproEnabled,
@@ -230,7 +230,7 @@ class ShopProductController
$product, $languages, $categories, $layouts, $products, $sets, $producers, $units, $dlang
);
- return \Tpl::view( 'shop-product/product-edit', [
+ return \Shared\Tpl\Tpl::view( 'shop-product/product-edit', [
'form' => $viewModel,
'product' => $product,
'user' => $user,
@@ -600,7 +600,7 @@ class ShopProductController
$html .= '
';
$html .= '
' . $catTitle . '';
$html .= '
';
- $html .= \Tpl::view( 'shop-product/subcategories-list', [
+ $html .= \Shared\Tpl\Tpl::view( 'shop-product/subcategories-list', [
'categories' => ( new CategoryRepository( $GLOBALS['mdb'] ) )->subcategories( $catId ),
'product_categories' => $product['categories'] ?? [],
'dlang' => $dlang,
@@ -949,7 +949,7 @@ class ShopProductController
{
$db = $GLOBALS['mdb'];
- return \Tpl::view( 'shop-product/product-combination', [
+ return \Shared\Tpl\Tpl::view( 'shop-product/product-combination', [
'product' => $this->repository->findForAdmin( (int) \Shared\Helpers\Helpers::get( 'product_id' ) ),
'attributes' => ( new \Domain\Attribute\AttributeRepository( $db ) )->getAttributesListForCombinations(),
'default_language' => $this->languagesRepository->defaultLanguage(),
@@ -1146,7 +1146,7 @@ class ShopProductController
{
$categoryRepository = new CategoryRepository( $GLOBALS['mdb'] );
- return \Tpl::view( 'shop-product/mass-edit', [
+ return \Shared\Tpl\Tpl::view( 'shop-product/mass-edit', [
'products' => $this->repository->allProductsForMassEdit(),
'categories' => $categoryRepository->subcategories( null ),
'dlang' => $this->languagesRepository->defaultLanguage(),
diff --git a/autoload/admin/Controllers/ShopProductSetsController.php b/autoload/admin/Controllers/ShopProductSetsController.php
index ab048ad..37434fd 100644
--- a/autoload/admin/Controllers/ShopProductSetsController.php
+++ b/autoload/admin/Controllers/ShopProductSetsController.php
@@ -120,7 +120,7 @@ class ShopProductSetsController
'Dodaj komplet produktow'
);
- return \Tpl::view('shop-product-sets/product-sets-list', [
+ return \Shared\Tpl\Tpl::view('shop-product-sets/product-sets-list', [
'viewModel' => $viewModel,
]);
}
@@ -135,7 +135,7 @@ class ShopProductSetsController
$set = $this->repository->find((int)\Shared\Helpers\Helpers::get('id'));
$products = $this->repository->allProductsMap();
- return \Tpl::view('shop-product-sets/product-set-edit', [
+ return \Shared\Tpl\Tpl::view('shop-product-sets/product-set-edit', [
'form' => $this->buildFormViewModel($set, $products),
]);
}
diff --git a/autoload/admin/Controllers/ShopPromotionController.php b/autoload/admin/Controllers/ShopPromotionController.php
index 9ceb17f..e356310 100644
--- a/autoload/admin/Controllers/ShopPromotionController.php
+++ b/autoload/admin/Controllers/ShopPromotionController.php
@@ -129,7 +129,7 @@ class ShopPromotionController
'Dodaj promocje'
);
- return \Tpl::view('shop-promotion/promotions-list', [
+ return \Shared\Tpl\Tpl::view('shop-promotion/promotions-list', [
'viewModel' => $viewModel,
]);
}
@@ -139,7 +139,7 @@ class ShopPromotionController
$promotion = $this->repository->find((int)\Shared\Helpers\Helpers::get('id'));
$categories = $this->repository->categoriesTree(null);
- return \Tpl::view('shop-promotion/promotion-edit', [
+ return \Shared\Tpl\Tpl::view('shop-promotion/promotion-edit', [
'form' => $this->buildFormViewModel($promotion, $categories),
]);
}
@@ -280,7 +280,7 @@ class ShopPromotionController
'label' => 'Data do',
'tab' => 'settings',
]),
- FormField::custom('categories_group_1', \Tpl::view('shop-promotion/promotion-categories-selector', [
+ FormField::custom('categories_group_1', \Shared\Tpl\Tpl::view('shop-promotion/promotion-categories-selector', [
'label' => 'Kategorie grupa I',
'inputName' => 'categories[]',
'categories' => $categories,
@@ -288,7 +288,7 @@ class ShopPromotionController
]), [
'tab' => 'categories',
]),
- FormField::custom('categories_group_2', \Tpl::view('shop-promotion/promotion-categories-selector', [
+ FormField::custom('categories_group_2', \Shared\Tpl\Tpl::view('shop-promotion/promotion-categories-selector', [
'label' => 'Kategorie grupa II',
'inputName' => 'condition_categories[]',
'categories' => $categories,
diff --git a/autoload/admin/Controllers/ShopStatusesController.php b/autoload/admin/Controllers/ShopStatusesController.php
index 27d0d7f..8ad5e44 100644
--- a/autoload/admin/Controllers/ShopStatusesController.php
+++ b/autoload/admin/Controllers/ShopStatusesController.php
@@ -115,7 +115,7 @@ class ShopStatusesController
'Brak danych w tabeli.'
);
- return \Tpl::view('shop-statuses/view-list', [
+ return \Shared\Tpl\Tpl::view('shop-statuses/view-list', [
'viewModel' => $viewModel,
]);
}
@@ -131,7 +131,7 @@ class ShopStatusesController
$apiloStatusList = $this->getApiloStatusList();
- return \Tpl::view('shop-statuses/status-edit', [
+ return \Shared\Tpl\Tpl::view('shop-statuses/status-edit', [
'form' => $this->buildFormViewModel($status, $apiloStatusList),
]);
}
diff --git a/autoload/admin/Controllers/ShopTransportController.php b/autoload/admin/Controllers/ShopTransportController.php
index 1a16e89..e886463 100644
--- a/autoload/admin/Controllers/ShopTransportController.php
+++ b/autoload/admin/Controllers/ShopTransportController.php
@@ -138,7 +138,7 @@ class ShopTransportController
'Brak danych w tabeli.'
);
- return \Tpl::view('shop-transport/transports-list', [
+ return \Shared\Tpl\Tpl::view('shop-transport/transports-list', [
'viewModel' => $viewModel,
]);
}
@@ -155,7 +155,7 @@ class ShopTransportController
$paymentMethods = $this->paymentMethodRepository->allForAdmin();
$apiloCarrierAccounts = $this->getApiloCarrierAccounts();
- return \Tpl::view('shop-transport/transport-edit', [
+ return \Shared\Tpl\Tpl::view('shop-transport/transport-edit', [
'form' => $this->buildFormViewModel($transport, $paymentMethods, $apiloCarrierAccounts),
]);
}
diff --git a/autoload/admin/Controllers/UpdateController.php b/autoload/admin/Controllers/UpdateController.php
index 4a607c5..6e6c77d 100644
--- a/autoload/admin/Controllers/UpdateController.php
+++ b/autoload/admin/Controllers/UpdateController.php
@@ -14,7 +14,7 @@ class UpdateController
public function main_view(): string
{
- return \Tpl::view( 'update/main-view', [
+ return \Shared\Tpl\Tpl::view( 'update/main-view', [
'ver' => \Shared\Helpers\Helpers::get_version(),
'new_ver' => \Shared\Helpers\Helpers::get_new_version(),
] );
diff --git a/autoload/admin/Controllers/UsersController.php b/autoload/admin/Controllers/UsersController.php
index e75ed3d..6fe5994 100644
--- a/autoload/admin/Controllers/UsersController.php
+++ b/autoload/admin/Controllers/UsersController.php
@@ -122,7 +122,7 @@ class UsersController
unset($_SESSION['form_errors'][$this->getFormId()]);
}
- return \Tpl::view('users/user-edit', [
+ return \Shared\Tpl\Tpl::view('users/user-edit', [
'form' => $this->buildFormViewModel($user, $validationErrors),
]);
}
@@ -228,7 +228,7 @@ class UsersController
'Dodaj uzytkownika'
);
- return \Tpl::view('users/users-list', [
+ return \Shared\Tpl\Tpl::view('users/users-list', [
'viewModel' => $viewModel,
]);
}
@@ -240,13 +240,13 @@ class UsersController
public function login_form(): string
{
- return \Tpl::view('site/unlogged-layout');
+ return \Shared\Tpl\Tpl::view('site/unlogged-layout');
}
public function twofa(): string
{
- return \Tpl::view('site/unlogged', [
- 'content' => \Tpl::view('users/user-2fa'),
+ return \Shared\Tpl\Tpl::view('site/unlogged', [
+ 'content' => \Shared\Tpl\Tpl::view('users/user-2fa'),
]);
}
diff --git a/autoload/front/Views/Articles.php b/autoload/front/Views/Articles.php
index 4fa78f6..cae3e4c 100644
--- a/autoload/front/Views/Articles.php
+++ b/autoload/front/Views/Articles.php
@@ -8,7 +8,7 @@ class Articles
*/
public static function fullArticle( $article )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl->article = $article;
return $tpl->render( 'articles/article' );
}
@@ -22,14 +22,14 @@ class Articles
if ( is_array( $articles ) ) foreach ( $articles as $article )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl->article = $article;
$out .= $tpl->render( 'articles/article-miniature' );
}
if ( $ls > 1 )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl->ls = $ls;
$tpl->bs = $bs ? $bs : 1;
$tpl->page = $page;
@@ -44,14 +44,14 @@ class Articles
*/
public static function entryArticlesList( $articles, $ls, $bs, $page )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl->page_id = $page['id'];
$tpl->articles = $articles;
$out = $tpl->render( 'articles/articles-entries' );
if ( $ls > 1 )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl->ls = $ls;
$tpl->bs = $bs ? $bs : 1;
$tpl->page = $page;
@@ -70,14 +70,14 @@ class Articles
if ( is_array( $articles ) ) foreach ( $articles as $article )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl->article = $article;
$out .= $tpl->render( 'articles/article-full' );
}
if ( $ls > 1 )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl->ls = $ls;
$tpl->bs = $bs ? $bs : 1;
$tpl->page = $page;
@@ -92,7 +92,7 @@ class Articles
*/
public static function news( $page_id, $articles )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl->page_id = $page_id;
$tpl->articles = $articles;
return $tpl->render( 'articles/news' );
@@ -103,7 +103,7 @@ class Articles
*/
public static function newsList( $articles )
{
- return \Tpl::view( 'articles/news-list', [
+ return \Shared\Tpl\Tpl::view( 'articles/news-list', [
'articles' => $articles
] );
}
diff --git a/autoload/front/Views/Banners.php b/autoload/front/Views/Banners.php
index fc640c7..e4924d5 100644
--- a/autoload/front/Views/Banners.php
+++ b/autoload/front/Views/Banners.php
@@ -5,7 +5,7 @@ class Banners
{
public static function banners($banners)
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl->banners = $banners;
return $tpl->render('banner/banners');
}
@@ -13,7 +13,7 @@ class Banners
public static function mainBanner($banner)
{
if (!\Shared\Helpers\Helpers::get_session('banner_close') && is_array($banner)) {
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl->banner = $banner;
return $tpl->render('banner/main-banner');
}
diff --git a/autoload/front/Views/Languages.php b/autoload/front/Views/Languages.php
index ec0e8ee..be39e58 100644
--- a/autoload/front/Views/Languages.php
+++ b/autoload/front/Views/Languages.php
@@ -5,7 +5,7 @@ class Languages
{
public static function render( $languages )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> languages = $languages;
return $tpl -> render( 'site/languages' );
}
diff --git a/autoload/front/Views/Newsletter.php b/autoload/front/Views/Newsletter.php
index be290d4..5dbea6e 100644
--- a/autoload/front/Views/Newsletter.php
+++ b/autoload/front/Views/Newsletter.php
@@ -5,7 +5,7 @@ class Newsletter
{
public static function render()
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
return $tpl -> render( 'newsletter/newsletter' );
}
}
diff --git a/autoload/front/controls/class.ShopBasket.php b/autoload/front/controls/class.ShopBasket.php
index 27ca141..c97ba0e 100644
--- a/autoload/front/controls/class.ShopBasket.php
+++ b/autoload/front/controls/class.ShopBasket.php
@@ -32,7 +32,7 @@ class ShopBasket
\Shared\Helpers\Helpers::set_session( 'basket', $basket );
echo json_encode( [
- 'basket' => \Tpl::view( 'shop-basket/basket-details', [
+ 'basket' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
'basket' => $basket,
'lang_id' => $lang_id,
'coupon' => $coupon
@@ -40,7 +40,7 @@ class ShopBasket
'basket_mini_count' => \front\factory\ShopBasket::count_products_text( \front\factory\ShopBasket::count_products( $basket ) ),
'basket_mini_value' => \front\factory\ShopBasket::summary_price( $basket, $coupon ),
'products_count' => count( $basket ),
- 'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
+ 'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
'transport_id' => $basket_transport_method_id
] )
@@ -67,7 +67,7 @@ class ShopBasket
\Shared\Helpers\Helpers::set_session( 'basket', $basket );
echo json_encode( [
- 'basket' => \Tpl::view( 'shop-basket/basket-details', [
+ 'basket' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
'basket' => $basket,
'lang_id' => $lang_id,
'coupon' => $coupon
@@ -75,7 +75,7 @@ class ShopBasket
'basket_mini_count' => \front\factory\ShopBasket::count_products_text( \front\factory\ShopBasket::count_products( $basket ) ),
'basket_mini_value' => \front\factory\ShopBasket::summary_price( $basket, $coupon ),
'products_count' => count( $basket ),
- 'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
+ 'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
'transport_id' => $basket_transport_method_id
] )
@@ -103,7 +103,7 @@ class ShopBasket
\Shared\Helpers\Helpers::set_session( 'basket', $basket );
echo json_encode( [
- 'basket' => \Tpl::view( 'shop-basket/basket-details', [
+ 'basket' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
'basket' => $basket,
'lang_id' => $lang_id,
'coupon' => $coupon
@@ -111,7 +111,7 @@ class ShopBasket
'basket_mini_count' => \front\factory\ShopBasket::count_products_text( \front\factory\ShopBasket::count_products( $basket ) ),
'basket_mini_value' => \front\factory\ShopBasket::summary_price( $basket, $coupon ),
'products_count' => count( $basket ),
- 'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
+ 'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
'transport_id' => $basket_transport_method_id
] )
@@ -140,7 +140,7 @@ class ShopBasket
$basket = \Shared\Helpers\Helpers::get_session( 'basket' );
echo json_encode( [
- 'basket' => \Tpl::view( 'shop-basket/basket-details', [
+ 'basket' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
'basket' => $basket,
'lang_id' => $lang_id,
'coupon' => $coupon
@@ -148,7 +148,7 @@ class ShopBasket
'basket_mini_count' => \front\factory\ShopBasket::count_products_text( \front\factory\ShopBasket::count_products( $basket ) ),
'basket_mini_value' => \front\factory\ShopBasket::summary_price( $basket, $coupon ),
'products_count' => count( $basket ),
- 'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
+ 'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
'transport_id' => $basket_transport_method_id
] )
@@ -339,7 +339,7 @@ class ShopBasket
$client = \Shared\Helpers\Helpers::get_session( 'client' );
- return \Tpl::view( 'shop-basket/summary-view', [
+ return \Shared\Tpl\Tpl::view( 'shop-basket/summary-view', [
'lang_id' => $lang_id,
'client' => \Shared\Helpers\Helpers::get_session( 'client' ),
'basket' => \Shared\Helpers\Helpers::get_session( 'basket' ),
@@ -437,16 +437,16 @@ class ShopBasket
$basket = \shop\Promotion::find_promotion( $basket );
- return \Tpl::view( 'shop-basket/basket', [
+ return \Shared\Tpl\Tpl::view( 'shop-basket/basket', [
'basket' => $basket,
'coupon' => $coupon,
'transport_id' => \Shared\Helpers\Helpers::get_session( 'basket-transport-method-id' ),
- 'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
+ 'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
'transport_id' => $basket_transport_method_id
] ),
'payment_method_id' => $payment_method_id,
- 'basket_details' => \Tpl::view( 'shop-basket/basket-details', [
+ 'basket_details' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
'basket' => $basket,
'lang_id' => $lang_id,
'coupon' => $coupon,
diff --git a/autoload/front/controls/class.ShopOrder.php b/autoload/front/controls/class.ShopOrder.php
index a57fa79..dbd7caa 100644
--- a/autoload/front/controls/class.ShopOrder.php
+++ b/autoload/front/controls/class.ShopOrder.php
@@ -8,7 +8,7 @@ class ShopOrder
$order = \front\factory\ShopOrder::order_details( null, \Shared\Helpers\Helpers::get( 'order_hash' ) );
- return \Tpl::view( 'shop-order/payment-confirmation', [
+ return \Shared\Tpl\Tpl::view( 'shop-order/payment-confirmation', [
'order' => $order,
'settings' => $settings
] );
@@ -143,7 +143,7 @@ class ShopOrder
);
$coupon = (int)$order['coupon_id'] ? new \shop\Coupon( (int)$order['coupon_id'] ) : null;
- return \Tpl::view( 'shop-order/order-details', [
+ return \Shared\Tpl\Tpl::view( 'shop-order/order-details', [
'order' => $order,
'coupon' => $coupon,
'client' => \Shared\Helpers\Helpers::get_session( 'client' ),
diff --git a/autoload/front/controls/class.ShopProducer.php b/autoload/front/controls/class.ShopProducer.php
index d118716..210f357 100644
--- a/autoload/front/controls/class.ShopProducer.php
+++ b/autoload/front/controls/class.ShopProducer.php
@@ -15,7 +15,7 @@ class ShopProducer
if ( $results['ls'] > 1 )
{
- $pager = \Tpl::view( 'site/pager', [
+ $pager = \Shared\Tpl\Tpl::view( 'site/pager', [
'ls' => $results['ls'],
'bs' => (int) \Shared\Helpers\Helpers::get( 'bs' ) ? (int) \Shared\Helpers\Helpers::get( 'bs' ) : 1,
'page' => $page,
@@ -23,7 +23,7 @@ class ShopProducer
] );
}
- return \Tpl::view( 'shop-producer/products', [
+ return \Shared\Tpl\Tpl::view( 'shop-producer/products', [
'producer' => $producer,
'products' => $results['products'],
'pager' => $pager
@@ -41,7 +41,7 @@ class ShopProducer
if ( \Shared\Helpers\Helpers::is_array_fix( $rows ) ) foreach ( $rows as $row )
$producers[] = new \shop\Producer( $row );
- return \Tpl::view( 'shop-producer/list', [
+ return \Shared\Tpl\Tpl::view( 'shop-producer/list', [
'producers' => $producers
] );
}
diff --git a/autoload/front/controls/class.ShopProduct.php b/autoload/front/controls/class.ShopProduct.php
index 3b6bb93..ec759c9 100644
--- a/autoload/front/controls/class.ShopProduct.php
+++ b/autoload/front/controls/class.ShopProduct.php
@@ -12,7 +12,7 @@ class ShopProduct
$products_ids = \front\factory\ShopCategory::products_id( \Shared\Helpers\Helpers::get( 'category_id' ), \front\factory\ShopCategory::get_category_sort( (int)\Shared\Helpers\Helpers::get( 'category_id' ) ), $lang_id, 8, \Shared\Helpers\Helpers::get( 'offset' ) );
if ( is_array( $products_ids ) ): foreach ( $products_ids as $product_id ):
- $output .= \Tpl::view('shop-product/product-mini', [
+ $output .= \Shared\Tpl\Tpl::view('shop-product/product-mini', [
'product' => Product::getFromCache( $product_id, $lang_id )
] );
endforeach;
diff --git a/autoload/front/controls/class.Site.php b/autoload/front/controls/class.Site.php
index 142e125..058e7ad 100644
--- a/autoload/front/controls/class.Site.php
+++ b/autoload/front/controls/class.Site.php
@@ -44,7 +44,7 @@ class Site
if ( $product )
{
\shop\Product::add_visit( $product -> id );
- return \Tpl::view( 'shop-product/product', [
+ return \Shared\Tpl\Tpl::view( 'shop-product/product', [
'product' => $product,
'settings' => $settings,
'lang_id' => $lang_id,
diff --git a/autoload/front/factory/class.ShopOrder.php b/autoload/front/factory/class.ShopOrder.php
index 2226910..d0b37c7 100644
--- a/autoload/front/factory/class.ShopOrder.php
+++ b/autoload/front/factory/class.ShopOrder.php
@@ -216,7 +216,7 @@ class ShopOrder
$order = \front\factory\ShopOrder::order_details( $order_id );
- $mail_order = \Tpl::view( 'shop-order/mail-summary', [
+ $mail_order = \Shared\Tpl\Tpl::view( 'shop-order/mail-summary', [
'settings' => $settings,
'order' => $order,
'coupon' => $coupon,
diff --git a/autoload/front/view/class.Menu.php b/autoload/front/view/class.Menu.php
index ea8a555..bedb43f 100644
--- a/autoload/front/view/class.Menu.php
+++ b/autoload/front/view/class.Menu.php
@@ -5,7 +5,7 @@ class Menu
{
public static function pages( $pages, $level = 0, $current_page = 0 )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> pages = $pages;
$tpl -> level = $level;
$tpl -> current_page = $current_page;
@@ -14,7 +14,7 @@ class Menu
public static function menu( $menu, $current_page )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> menu = $menu;
$tpl -> current_page = $current_page;
return $tpl -> render( 'menu/menu' );
diff --git a/autoload/front/view/class.Scontainers.php b/autoload/front/view/class.Scontainers.php
index 67703e2..db672f2 100644
--- a/autoload/front/view/class.Scontainers.php
+++ b/autoload/front/view/class.Scontainers.php
@@ -5,7 +5,7 @@ class Scontainers
{
public static function scontainer( $id )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> scontainer = \front\factory\Scontainers::scontainer_details( $id );
return $tpl -> render( 'scontainers/scontainer' );
}
diff --git a/autoload/front/view/class.ShopCategory.php b/autoload/front/view/class.ShopCategory.php
index d1969dc..c57f9fb 100644
--- a/autoload/front/view/class.ShopCategory.php
+++ b/autoload/front/view/class.ShopCategory.php
@@ -4,7 +4,7 @@ class ShopCategory
{
static public function category_description( $category )
{
- return \Tpl::view( 'shop-category/category-description', [
+ return \Shared\Tpl\Tpl::view( 'shop-category/category-description', [
'category' => $category
] );
}
@@ -19,7 +19,7 @@ class ShopCategory
if ( $results['ls'] > 1 )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> ls = $results['ls'];
$tpl -> bs = $bs ? $bs : 1;
$tpl -> page = $page;
@@ -27,7 +27,7 @@ class ShopCategory
$pager = $tpl -> render( 'site/pager' );
}
- return \Tpl::view( 'shop-category/category', [
+ return \Shared\Tpl\Tpl::view( 'shop-category/category', [
'category' => $category,
'products' => $results['products'],
'pager' => $pager,
@@ -37,7 +37,7 @@ class ShopCategory
}
$products_count = \front\factory\ShopCategory::category_products_count( $category, $lang_id );
- return \Tpl::view( 'shop-category/category-infinitescroll', [
+ return \Shared\Tpl\Tpl::view( 'shop-category/category-infinitescroll', [
'category' => $category,
'products_count' => $products_count,
'category_description' => (int)$bs <= 1 ? true : false,
@@ -47,7 +47,7 @@ class ShopCategory
public static function categories( $categories, $current_category = 0, $level = 0 )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> level = $level;
$tpl -> current_category = $current_category;
$tpl -> categories = $categories;
diff --git a/autoload/front/view/class.ShopClient.php b/autoload/front/view/class.ShopClient.php
index af759eb..9a0c14c 100644
--- a/autoload/front/view/class.ShopClient.php
+++ b/autoload/front/view/class.ShopClient.php
@@ -4,7 +4,7 @@ class ShopClient
{
public static function address_edit( $values )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'shop-client/address-edit' );
@@ -12,7 +12,7 @@ class ShopClient
public static function client_addresses( $values )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'shop-client/client-addresses' );
@@ -21,7 +21,7 @@ class ShopClient
public static function client_menu( $values )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'shop-client/client-menu' );
@@ -29,7 +29,7 @@ class ShopClient
public static function client_orders( $values )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'shop-client/client-orders' );
@@ -37,21 +37,21 @@ class ShopClient
public static function recover_password()
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
return $tpl -> render( 'shop-client/recover-password' );
}
public static function mini_login()
{
global $client;
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> client = $client;
return $tpl -> render( 'shop-client/mini-login' );
}
public static function login_form( $values = '' )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'shop-client/login-form' );
@@ -59,7 +59,7 @@ class ShopClient
public static function register_form()
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
return $tpl -> render( 'shop-client/register-form' );
}
}
diff --git a/autoload/front/view/class.ShopOrder.php b/autoload/front/view/class.ShopOrder.php
index d28356a..c255c26 100644
--- a/autoload/front/view/class.ShopOrder.php
+++ b/autoload/front/view/class.ShopOrder.php
@@ -4,7 +4,7 @@ class ShopOrder
{
public static function order_details( $values )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'shop-order/order-details' );
diff --git a/autoload/front/view/class.ShopPaymentMethod.php b/autoload/front/view/class.ShopPaymentMethod.php
index 59ef1aa..39cd5df 100644
--- a/autoload/front/view/class.ShopPaymentMethod.php
+++ b/autoload/front/view/class.ShopPaymentMethod.php
@@ -4,7 +4,7 @@ class ShopPaymentMethod
{
public static function basket_payment_methods( $payment_methods, $payment_id )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> payment_methods = $payment_methods;
$tpl -> payment_id = $payment_id;
return $tpl -> render( 'shop-basket/basket-payments-methods' );
diff --git a/autoload/front/view/class.Site.php b/autoload/front/view/class.Site.php
index 61864ff..9403f85 100644
--- a/autoload/front/view/class.Site.php
+++ b/autoload/front/view/class.Site.php
@@ -60,7 +60,7 @@ class Site
$html = str_replace( '[BANER_STRONA_GLOWNA]', \front\Views\Banners::mainBanner( $bannerRepo->mainBanner( $lang_id ) ), $html );
$html = str_replace( '[BANERY]', \front\Views\Banners::banners( $bannerRepo->banners( $lang_id ) ), $html );
- $html = str_replace( '[KATEGORIE]', \Tpl::view( 'shop-category/categories', [
+ $html = str_replace( '[KATEGORIE]', \Shared\Tpl\Tpl::view( 'shop-category/categories', [
'level' => $level,
'current_category' => \Shared\Helpers\Helpers::get( 'category' ),
'categories' => \front\factory\ShopCategory::categories_details()
@@ -76,7 +76,7 @@ class Site
$products_promoted_tmp[1] ? $pattern = '[PROMOWANE_PRODUKTY:' . $products_promoted_tmp[1] . ']' : $pattern = '[PROMOWANE_PRODUKTY]';
$html = str_replace( $pattern,
- \Tpl::view( 'shop-product/promoted-products', [
+ \Shared\Tpl\Tpl::view( 'shop-product/promoted-products', [
'products' => \front\factory\ShopProduct::promoted_products( $limit )
] ),
$html
@@ -99,7 +99,7 @@ class Site
}
$html = str_replace( '[KOSZYK]',
- \Tpl::view( 'shop-basket/basket-mini', [
+ \Shared\Tpl\Tpl::view( 'shop-basket/basket-mini', [
'basket' => \Shared\Helpers\Helpers::get_session( 'basket' ),
'lang_id' => $lang_id,
'coupon' => \Shared\Helpers\Helpers::get_session( 'coupon' )
@@ -129,7 +129,7 @@ class Site
$menu_tmp = explode( ':', $menu_tmp );
$html = str_replace(
'[MENU_GLOWNE:' . $menu_tmp[1] . ']',
- \Tpl::view( 'menu/main-menu', [
+ \Shared\Tpl\Tpl::view( 'menu/main-menu', [
'menu' => \front\factory\Menu::menu_details( $menu_tmp[1] )
] ),
$html );
@@ -237,7 +237,7 @@ class Site
$single_product = explode( ':', $single_product );
$html = str_replace(
'[PRODUKT:' . $single_product[1] . ']',
- \Tpl::view( 'shop-product/product-mini', [
+ \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => \shop\Product::getFromCache( (int)$single_product[1], $lang_id )
] ),
$html
@@ -259,7 +259,7 @@ class Site
$html = str_replace(
'[PRODUKTY_BOX:' . $products_box[1] . ']',
- \Tpl::view( 'shop-product/products-box', [
+ \Shared\Tpl\Tpl::view( 'shop-product/products-box', [
'products' => $products
] ),
$html
@@ -287,7 +287,7 @@ class Site
}
$html = str_replace( $pattern,
- \Tpl::view( 'shop-product/products-top', [
+ \Shared\Tpl\Tpl::view( 'shop-product/products-top', [
'products' => $top_products_arr,
] ),
$html
@@ -316,7 +316,7 @@ class Site
}
$html = str_replace( $pattern,
- \Tpl::view( 'shop-product/products-new', [
+ \Shared\Tpl\Tpl::view( 'shop-product/products-new', [
'products' => $top_products_arr,
] ),
$html
@@ -377,7 +377,7 @@ class Site
$html = str_replace(
$pattern,
- \Tpl::view( 'shop-category/blog-category-products', [
+ \Shared\Tpl\Tpl::view( 'shop-category/blog-category-products', [
'products' => \front\factory\ShopCategory::blog_category_products( $category_list_tmp[1], $lang_id, $products_limit )
] ),
$html );
@@ -421,14 +421,14 @@ class Site
public static function facebook( $facebook_link )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> facebook_link = $facebook_link;
return $tpl -> render( 'site/facebook' );
}
static public function title( $title, $show_title, $page_title )
{
- return \Tpl::view( 'site/title', [
+ return \Shared\Tpl\Tpl::view( 'site/title', [
'title' => $title,
'page_title' => $page_title,
'show_title' => $show_title
@@ -441,7 +441,7 @@ class Site
{
\Shared\Helpers\Helpers::delete_session( 'alert' );
- return $tpl = \Tpl::view( 'site/alert', [
+ return $tpl = \Shared\Tpl\Tpl::view( 'site/alert', [
'alert' => $alert
] );
}
@@ -450,7 +450,7 @@ class Site
{
\Shared\Helpers\Helpers::delete_session( 'error' );
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> error = $error;
return $tpl -> render( 'site/error' );
}
@@ -458,19 +458,19 @@ class Site
public static function copyright()
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
return $tpl -> render( 'site/copyright' );
}
public static function contact()
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
return $tpl -> render( 'site/contact' );
}
public static function cookie_information()
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
return $tpl -> render( 'site/cookie-information' );
}
}
diff --git a/autoload/shop/class.Order.php b/autoload/shop/class.Order.php
index fd40117..92a980c 100644
--- a/autoload/shop/class.Order.php
+++ b/autoload/shop/class.Order.php
@@ -169,7 +169,7 @@ class Order implements \ArrayAccess
$order = \front\factory\ShopOrder::order_details( $this -> id );
$coupon = (int)$order['coupon_id'] ? new \shop\Coupon( (int)$order['coupon_id'] ) : null;
- $mail_order = \Tpl::view( 'shop-order/mail-summary', [
+ $mail_order = \Shared\Tpl\Tpl::view( 'shop-order/mail-summary', [
'settings' => $settings,
'order' => $order,
'coupon' => $coupon,
diff --git a/autoload/shop/class.Product.php b/autoload/shop/class.Product.php
index 3faf184..249480b 100644
--- a/autoload/shop/class.Product.php
+++ b/autoload/shop/class.Product.php
@@ -348,7 +348,7 @@ class Product implements \ArrayAccess
$products = array_diff( $products, [ $product_id ] );
}
- return \Tpl::view( 'shop-basket/alert-product-sets', [
+ return \Shared\Tpl\Tpl::view( 'shop-basket/alert-product-sets', [
'products' => $products
] );
}
diff --git a/autoload/shop/class.Search.php b/autoload/shop/class.Search.php
index 0444571..a34cd53 100644
--- a/autoload/shop/class.Search.php
+++ b/autoload/shop/class.Search.php
@@ -6,7 +6,7 @@ class Search implements \ArrayAccess
{
static public function simple_form()
{
- return \Tpl::view( 'shop-search/simple-form' );
+ return \Shared\Tpl\Tpl::view( 'shop-search/simple-form' );
}
static public function search_results()
@@ -17,14 +17,14 @@ class Search implements \ArrayAccess
$results = \shop\Product::searchProductsByName( \Shared\Helpers\Helpers::get( 'query' ), $lang_id, (int)$bs );
- $out = \Tpl::view( 'shop-search/products', [
+ $out = \Shared\Tpl\Tpl::view( 'shop-search/products', [
'query' => \Shared\Helpers\Helpers::get( 'query' ),
'products' => $results['products']
]);
if ( $results['ls'] > 1 )
{
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> ls = $results['ls'];
$tpl -> bs = $bs ? $bs : 1;
$tpl -> link = 'wyszukiwarka/' . \Shared\Helpers\Helpers::get( 'query' );
@@ -40,7 +40,7 @@ class Search implements \ArrayAccess
$results = \shop\Product::searchProductByNameAjax( \Shared\Helpers\Helpers::get( 'query' ), $lang_id );
if ( \Shared\Helpers\Helpers::is_array_fix( $results ) ) foreach ( $results as $row )
- $products[] = \Tpl::view( 'shop-search/product-search', [
+ $products[] = \Shared\Tpl\Tpl::view( 'shop-search/product-search', [
'product' => Product::getFromCache( $row['product_id'], $lang_id )
] );
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index fdaeb91..694ca11 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -4,6 +4,24 @@ Logi zmian z migracji na Domain-Driven Architecture. Najnowsze na gorze.
---
+## ver. 0.285 (2026-02-17) - Tpl namespace, CurlServer removal, thumb.php fix
+
+- **Shared\Tpl\Tpl** — migracja silnika szablonow do namespace Shared
+ - NOWY: `autoload/Shared/Tpl/Tpl.php` (namespace `Shared\Tpl`)
+ - USUNIETA: `autoload/class.Tpl.php` — zastapiona przez `Shared\Tpl\Tpl`
+ - ZAMIENIONE: ~135 plikow — `\Tpl::` / `new \Tpl` → `\Shared\Tpl\Tpl::` / `new \Shared\Tpl\Tpl`
+ - DRY: wyciagnieto powtorzony `ob_start/include/ob_get_contents/ob_end_clean` do prywatnej metody `renderFile()`
+ - FIX: bug w `render()` branch 3 — sprawdzal `../templates_user/` ale ladowal `../templates/`
+ - CLEANUP: usunieta nieuzywana property `$dir` i konstruktor `__construct($dir)`
+- **CurlServer** — usuniecie nieuzywanej klasy
+ - USUNIETA: `autoload/curl.class.php` — klasa `CurlServer` bez referencji w projekcie (0 uzyc)
+- **thumb.php** — naprawa require po migracji Image
+ - FIX: `libraries/thumb.php` — zmiana `require_once '../autoload/class.Image.php'` na `../autoload/Shared/Image/ImageManipulator.php` + `use`
+ - FIX: poprawiony short open tag `` na ` article['language']['text'], '[GALERIA]' ) !== false )
{
if ( is_array( $this -> article['images'] ) ):
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> article = $this -> article;
$tpl -> images = $this -> article['images'];
$gallery = $tpl -> render( 'articles/article-gallery' );
@@ -92,7 +92,7 @@ $text = \front\Views\Articles::generateHeadersIds( $text );
if ( strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) !== false )
{
if ( is_array( $this -> article['files'] ) ):
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> article = $this -> article;
$tpl -> files = $this -> article['files'];
$files = $tpl -> render( 'articles/article-files' );
@@ -121,7 +121,7 @@ $text = \front\Views\Articles::generateHeadersIds( $text );
$images[] = $image;
}
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> images = $images;
$tpl -> article_id = $this -> article['id'];
$tpl -> i = $i;
@@ -161,14 +161,14 @@ $text = \front\Views\Articles::generateHeadersIds( $text );
if ( is_array( $this -> article['images'] ) and strpos( $this -> article['language']['text'], '[GALERIA]' ) === false ):
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> article = $this -> article;
$tpl -> images = $this -> article['images'];
echo $tpl -> render( 'articles/article-gallery' );
endif;
if ( is_array( $this -> article['files'] ) and strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) === false ):
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> article = $this -> article;
$tpl -> files = $this -> article['files'];
echo $tpl -> render( 'articles/article-files' );
diff --git a/templates/articles/articles-entries.php b/templates/articles/articles-entries.php
index 34a2a49..e6ebfdf 100644
--- a/templates/articles/articles-entries.php
+++ b/templates/articles/articles-entries.php
@@ -1,6 +1,6 @@
if ( is_array( $this -> articles ) ): foreach ( $this -> articles as $article ):
- $tpl = new \Tpl;
+ $tpl = new \Shared\Tpl\Tpl;
$tpl -> page_id = $this -> page_id;
$tpl -> article = $article;
echo $tpl -> render( 'articles/article-entry' );
diff --git a/templates/shop-basket/basket-details.php b/templates/shop-basket/basket-details.php
index 467100b..240e011 100644
--- a/templates/shop-basket/basket-details.php
+++ b/templates/shop-basket/basket-details.php
@@ -59,7 +59,7 @@
endforeach; ?>
endif; ?>
- = \Tpl::view( 'shop-basket/_partials/product-custom-fields', [
+ = \Shared\Tpl\Tpl::view( 'shop-basket/_partials/product-custom-fields', [
'custom_fields' => $position['custom_fields']
] ); ?>
if ( $product -> additional_message ):?>
@@ -117,7 +117,7 @@
- = \Tpl::view( 'shop-coupon/form', [
+ = \Shared\Tpl\Tpl::view( 'shop-coupon/form', [
'coupon' => \Shared\Helpers\Helpers::get_session('coupon')
] );
?>
diff --git a/templates/shop-basket/summary-view.php b/templates/shop-basket/summary-view.php
index 938b33c..fc7a751 100644
--- a/templates/shop-basket/summary-view.php
+++ b/templates/shop-basket/summary-view.php
@@ -40,7 +40,7 @@
endforeach; ?>
endif;?>
- = \Tpl::view( 'shop-basket/_partials/product-custom-fields', [
+ = \Shared\Tpl\Tpl::view( 'shop-basket/_partials/product-custom-fields', [
'custom_fields' => $position['custom_fields']
] ); ?>
@@ -138,12 +138,12 @@
?>
- = \Tpl::view( 'shop-basket/address-form', [
+ = \Shared\Tpl\Tpl::view( 'shop-basket/address-form', [
'transport_method' => $this -> transport
] );?>
else:?>
- = \Tpl::view( 'shop-basket/address-form', [
+ = \Shared\Tpl\Tpl::view( 'shop-basket/address-form', [
'client' => $this -> client,
'addresses' => $this -> addresses,
'transport_method' => $this -> transport
diff --git a/templates/shop-category/blog-category-products.php b/templates/shop-category/blog-category-products.php
index 6bf78aa..7ca0a9d 100644
--- a/templates/shop-category/blog-category-products.php
+++ b/templates/shop-category/blog-category-products.php
@@ -1,7 +1,7 @@
global $lang_id;?>
if ( is_array( $this -> products ) ): foreach ( $this -> products as $product_id ):?>
- = \Tpl::view( 'shop-product/product-mini', [
+ = \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => \shop\Product::getFromCache( $product_id, $lang_id ),
'class' => 'col-12 col-sm-6 col-lg-3'
] );?>
diff --git a/templates/shop-category/category-infinitescroll.php b/templates/shop-category/category-infinitescroll.php
index 321285f..1352b16 100644
--- a/templates/shop-category/category-infinitescroll.php
+++ b/templates/shop-category/category-infinitescroll.php
@@ -6,14 +6,14 @@
endif; ?>
if ($this->category_additional_text) :
- echo \Tpl::view('shop-category/_partials/category-additional-text', [
+ echo \Shared\Tpl\Tpl::view('shop-category/_partials/category-additional-text', [
'category' => $this->category
]);
endif;
?>
if (is_array($this->products)) : foreach ($this->products as $product_id) :
- echo \Tpl::view('shop-product/product-mini', [
+ echo \Shared\Tpl\Tpl::view('shop-product/product-mini', [
'product' => \shop\Product::getFromCache( $product_id, $lang_id )
]);
endforeach;
@@ -21,7 +21,7 @@ endif;
if ($this->category_description) :
- echo \Tpl::view('shop-category/category-description', [
+ echo \Shared\Tpl\Tpl::view('shop-category/category-description', [
'category' => $this->category
]);
endif;
diff --git a/templates/shop-category/category.php b/templates/shop-category/category.php
index 9df22a9..cac1631 100644
--- a/templates/shop-category/category.php
+++ b/templates/shop-category/category.php
@@ -6,7 +6,7 @@
endif;?>
if ( $this -> category_additional_text ):
- echo \Tpl::view( 'shop-category/_partials/category-additional-text', [
+ echo \Shared\Tpl\Tpl::view( 'shop-category/_partials/category-additional-text', [
'category' => $this -> category
] );
endif;
@@ -15,7 +15,7 @@ endif;
category['view_subcategories'] ):
- echo \Tpl::view( 'shop-category/_partials/category-subcategory-tiles', [
+ echo \Shared\Tpl\Tpl::view( 'shop-category/_partials/category-subcategory-tiles', [
'categories' => \shop\Category::get_subcategory_by_category( $this -> category['id'] ),
] );
@@ -24,7 +24,7 @@ endif;
if ( is_array( $this -> products ) ): foreach ( $this -> products as $product_id ):
- echo \Tpl::view( 'shop-product/product-mini', [
+ echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => \shop\Product::getFromCache( $product_id, $lang_id )
] );
endforeach; endif;?>
@@ -32,7 +32,7 @@ endif;
= $this -> pager;?>
if ( $this -> category_description ):
- echo \Tpl::view( 'shop-category/category-description', [
+ echo \Shared\Tpl\Tpl::view( 'shop-category/category-description', [
'category' => $this -> category
] );
endif;
diff --git a/templates/shop-category/products.php b/templates/shop-category/products.php
index 3700dbf..75ae448 100644
--- a/templates/shop-category/products.php
+++ b/templates/shop-category/products.php
@@ -7,7 +7,7 @@
if ( is_array( $this -> products ) ): foreach ( $this -> products as $product_id ):
$product = new \shop\Product( $product_id );
- echo \Tpl::view( 'shop-product/product-mini', [
+ echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => new \shop\Product( $product_id, $lang_id )
] );
endforeach; endif;?>
diff --git a/templates/shop-client/client-orders.php b/templates/shop-client/client-orders.php
index cd7ba88..21a269a 100644
--- a/templates/shop-client/client-orders.php
+++ b/templates/shop-client/client-orders.php
@@ -7,7 +7,7 @@
= ucfirst( \Shared\Helpers\Helpers::lang( 'historia-zamowien' ) );?>
if ( is_array( $this -> orders ) ): foreach ( $this -> orders as $order ):?>
- = \Tpl::view( 'shop-order/order-simple', [
+ = \Shared\Tpl\Tpl::view( 'shop-order/order-simple', [
'order' => $order,
'statuses' => \shop\Order::order_statuses()
] );?>
diff --git a/templates/shop-order/order-details.php b/templates/shop-order/order-details.php
index 37f8eee..a163b99 100644
--- a/templates/shop-order/order-details.php
+++ b/templates/shop-order/order-details.php
@@ -3,7 +3,7 @@
= ucfirst( \Shared\Helpers\Helpers::lang( 'szczegoly-zamowienia' ) );?>: = $this -> order['number'];?>
- = \Tpl::view( 'shop-order/order-simple', [
+ = \Shared\Tpl\Tpl::view( 'shop-order/order-simple', [
'order' => $this -> order,
'coupon' => $this -> coupon,
'statuses' => \shop\Order::order_statuses()
diff --git a/templates/shop-producer/products.php b/templates/shop-producer/products.php
index 89990ca..8e5e871 100644
--- a/templates/shop-producer/products.php
+++ b/templates/shop-producer/products.php
@@ -1,7 +1,7 @@
global $lang_id;?>
if ( is_array( $this -> products ) ): foreach ( $this -> products as $product_id ):
- echo \Tpl::view( 'shop-product/product-mini', [
+ echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => $product = \shop\Product::getFromCache( $product_id, $lang_id )
] );
endforeach; endif;?>
@@ -9,7 +9,7 @@
= $this -> pager;?>
if ( $this -> producer['languages'][$lang_id]['description'] ):
- echo \Tpl::view( 'shop-producer/description', [
+ echo \Shared\Tpl\Tpl::view( 'shop-producer/description', [
'description' => $this -> producer['languages'][$lang_id]['description']
] );
endif;
diff --git a/templates/shop-product/product.php b/templates/shop-product/product.php
index 2fd6e11..96b932e 100644
--- a/templates/shop-product/product.php
+++ b/templates/shop-product/product.php
@@ -40,7 +40,7 @@
- = \Tpl::view( 'shop-product/_partial/product-warehouse-message', [
+ = \Shared\Tpl\Tpl::view( 'shop-product/_partial/product-warehouse-message', [
'product' => $this -> product,
'lang_id' => $this -> lang_id,
'settings' => $this -> settings
@@ -79,7 +79,7 @@
Opcje produktu
foreach ( $attributes as $key => $val )
- echo \Tpl::view( 'shop-product/_partial/product-attribute', [
+ echo \Shared\Tpl\Tpl::view( 'shop-product/_partial/product-attribute', [
'attribute' => $val,
'order' => $key,
'level' => ++$level,
@@ -92,7 +92,7 @@
endif;?>
- = \Tpl::view( 'shop-product/_partial/product-custom-fields', [
+ = \Shared\Tpl\Tpl::view( 'shop-product/_partial/product-custom-fields', [
'custom_fields' => $this -> product['custom_fields']
] );?>
@@ -127,7 +127,7 @@
endif;?>
- = \Tpl::view( 'shop-product/_partial/product-meta', [
+ = \Shared\Tpl\Tpl::view( 'shop-product/_partial/product-meta', [
'product_id' => $this->product['id']
]);?>
@@ -223,7 +223,7 @@
foreach ( $this -> product['products_sets'] as $product_sets_id ):
$product = \shop\Product::getFromCache( $product_sets_id, $lang_id );
if ( $product and $product -> status ):
- echo \Tpl::view( 'shop-product/product-mini', [
+ echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => $product,
'class' => 'item'
] );
@@ -245,7 +245,7 @@
foreach ( $this -> product['products_related'] as $product_related_id ):
$product = \shop\Product::getFromCache( $product_related_id, $lang_id );
if ( $product and $product -> status ):
- echo \Tpl::view( 'shop-product/product-mini', [
+ echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => $product,
'class' => 'item'
] );
diff --git a/templates/shop-product/products-box.php b/templates/shop-product/products-box.php
index bd7c021..e8c36ec 100644
--- a/templates/shop-product/products-box.php
+++ b/templates/shop-product/products-box.php
@@ -5,7 +5,7 @@
foreach ( $this -> products as $product ):
if ( $product -> status ):
- echo \Tpl::view( 'shop-product/product-mini', [
+ echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => $product,
'class' => 'item',
'product_mini_class' => 'swiper-slide'
diff --git a/templates/shop-product/products-new.php b/templates/shop-product/products-new.php
index 962338e..8322375 100644
--- a/templates/shop-product/products-new.php
+++ b/templates/shop-product/products-new.php
@@ -7,7 +7,7 @@
foreach ( $this -> products as $product ):
if ( $product -> status ):
- echo \Tpl::view( 'shop-product/product-mini', [
+ echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => $product,
'class' => 'item',
'product_mini_class' => 'swiper-slide'
diff --git a/templates/shop-product/products-top.php b/templates/shop-product/products-top.php
index 767f956..9befd75 100644
--- a/templates/shop-product/products-top.php
+++ b/templates/shop-product/products-top.php
@@ -7,7 +7,7 @@
foreach ( $this -> products as $product ):
if ( $product -> status ):
- echo \Tpl::view( 'shop-product/product-mini', [
+ echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => $product,
'class' => 'item',
'product_mini_class' => 'swiper-slide'
diff --git a/templates/shop-product/promoted-products.php b/templates/shop-product/promoted-products.php
index 4849f89..1a76122 100644
--- a/templates/shop-product/promoted-products.php
+++ b/templates/shop-product/promoted-products.php
@@ -10,7 +10,7 @@
if ( \Shared\Helpers\Helpers::get_session( 'current-lang' ) != ( new \Domain\Languages\LanguagesRepository( $GLOBALS['mdb'] ) )->defaultLanguage() and $url != '#' )
$url = '/' . \Shared\Helpers\Helpers::get_session( 'current-lang' ) . $url;
?>
- = \Tpl::view( 'shop-product/product-mini', [
+ = \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => $product,
'class' => 'col-12 col-sm-4 col-md-4 col-lg-3'
] );?>
diff --git a/templates/shop-search/products.php b/templates/shop-search/products.php
index cd7a65a..4841ada 100644
--- a/templates/shop-search/products.php
+++ b/templates/shop-search/products.php
@@ -6,7 +6,7 @@
endif;?>
if ( is_array( $this -> products ) ): foreach ( $this -> products as $product_id ):
- echo \Tpl::view( 'shop-product/product-mini', [
+ echo \Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => \shop\Product::getFromCache( $product_id, $lang_id )
] );
endforeach; endif;?>
diff --git a/updates/0.20/ver_0.285.zip b/updates/0.20/ver_0.285.zip
new file mode 100644
index 0000000..1225b57
Binary files /dev/null and b/updates/0.20/ver_0.285.zip differ
diff --git a/updates/0.20/ver_0.285_files.txt b/updates/0.20/ver_0.285_files.txt
new file mode 100644
index 0000000..8ae5b84
--- /dev/null
+++ b/updates/0.20/ver_0.285_files.txt
@@ -0,0 +1,2 @@
+F: ../autoload/class.Tpl.php
+F: ../autoload/curl.class.php
diff --git a/updates/changelog.php b/updates/changelog.php
index ab1512b..c2bf331 100644
--- a/updates/changelog.php
+++ b/updates/changelog.php
@@ -1,3 +1,9 @@
+ver. 0.285 - 17.02.2026
+- UPDATE - migracja class.Tpl.php do Shared\Tpl\Tpl (~135 plikow przepietych)
+- CLEANUP - usunieta nieuzywana klasa CurlServer (curl.class.php)
+- FIX - thumb.php: naprawa require po migracji Image do Shared namespace
+- FIX - Tpl::render() branch 3: sprawdzal templates_user ale ladowal templates
+
ver. 0.284 - 16.02.2026
- CLEANUP - usunieta klasa DbModel (base ORM) — logika wbudowana bezposrednio w shop\Promotion
diff --git a/updates/versions.php b/updates/versions.php
index 211079b..3113e54 100644
--- a/updates/versions.php
+++ b/updates/versions.php
@@ -1,5 +1,5 @@
-$current_ver = 284;
+$current_ver = 285;
for ($i = 1; $i <= $current_ver; $i++)
{