Skip to content
Code-Schnipsel Gruppen Projekte
Commit 876d50e1 erstellt von Dominik Chrzanowski's avatar Dominik Chrzanowski
Dateien durchsuchen

feat: Added basic functionality [Timeline] #1

Übergeordneter 30529fc9
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -7,7 +7,6 @@
namespace QUI\Timeline\Bricks;
use QUI;
use QUI\Projects\Site\Utils;
/**
* Class Timeline
......@@ -17,5 +16,48 @@
class Timeline extends QUI\Control
{
/**
* 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');
}
}
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren