Newer
Older
<?php
/**
* This file contains QUI\Timeline\Bricks\Timeline
*/
namespace QUI\Timeline\Bricks;
use QUI;
/**
* Class Timeline
*
* @package quiqqer/timeline
*/
class Timeline extends QUI\Control
{
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
* constructor
*
* @param array $attributes
*/
public function __construct($attributes = [])
{
// default options
$this->setAttributes([
]);
parent::__construct($attributes);
$this->setAttribute('cacheable', 0);
}
/**
* Return the inner body of the element
* Can be overwritten
*
* @return String
*/
public function getBody()
{
$Engine = QUI::getTemplateManager()->getEngine();
$Control = new QUI\Timeline\Controls\Timeline();
$Control->setAttribute('parentInputList', $this->getAttribute('site'));
$result = $Control->create();
$this->addCSSFiles($Control->getCSSFiles());
$options = [
'body' => $result
];
$Engine->assign($options);
return $Engine->fetch(\dirname(__FILE__) . '/Timeline.html');
}