Commit ce293945 authored by Peter Tönnies's avatar Peter Tönnies

a public field... how mean

Forgot references towards public $jsData = [];
parent e14e49d0
Pipeline #48974964 passed with stages
in 9 minutes and 17 seconds
......@@ -2,6 +2,7 @@
namespace Foodsharing\Lib\View;
use Foodsharing\Helpers\PageHelper;
use Foodsharing\Lib\Func;
class vPageslider
......@@ -10,17 +11,17 @@ class vPageslider
private $id;
private $defaultBgColor;
public static $pageslider_count = 0;
/**
* @var Func
*/
private $func;
public static $pageslider_count = 0;
private $pageHelper;
public function __construct()
{
global $container;
$this->func = $container->get(Func::class);
$this->pageHelper = $container->get(PageHelper::class);
$this->sections = array();
$this->defaultBgColor = '#F1E7C9';
......@@ -79,11 +80,11 @@ class vPageslider
'sections' => $this->sections,
];
if (!isset($this->func->jsData['sliders'])) {
$this->func->jsData['sliders'] = [];
if (!isset($this->pageHelper->jsData['sliders'])) {
$this->pageHelper->jsData['sliders'] = [];
}
$this->func->jsData['sliders'][] = $slider;
$this->pageHelper->jsData['sliders'][] = $slider;
return '
<div id="' . $this->id . '">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment