Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit aadaf4e

Browse files
author
Guillermo Cespedes
committed
fix redeclaration of View Class
1 parent fb57b3d commit aadaf4e

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace Particle\Apps\Views;
4+
5+
use Particle\Core;
6+
7+
class assignLayout extends Core\Controller
8+
{
9+
public function __construct()
10+
{
11+
$noLoadView = true;
12+
parent::__construct($noLoadView);
13+
}
14+
15+
public function procesar(): array
16+
{
17+
// return array(
18+
// 'testAssignLayoutOne' => '1',
19+
// 'testAssignLayoutTwo' => '2'
20+
// );
21+
return array();
22+
}
23+
}

Particle/Core/View.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,7 @@ public function show($view = false, $customController = false, $return = false,
213213
$this->setTemplateDir($pathLayoutFile);
214214
$this->addTemplateDir($absoluteView, 'currentview');
215215

216-
if (!$this->isCached('header.tpl', self::$cacheKey) || !$this->isCached('footer.tpl', self::$cacheKey)) {
217-
$this->assign('_layoutParams', $_params);
218-
}
216+
$this->assign('_layoutParams', $_params);
219217

220218
if (defined('VARGLOBALJS')) {
221219
$this->assign('varGlobalToJs', VARGLOBALJS);
@@ -272,7 +270,6 @@ public function show($view = false, $customController = false, $return = false,
272270
echo $sHeader.$sMenuTop.$sView.$sFooter;
273271
break;
274272
}
275-
//exit();
276273
} else {
277274
switch ($typereturn) {
278275
case 'full':

0 commit comments

Comments
 (0)