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
{
/**
* constructor
*
* @param array $attributes
*/
public function __construct($attributes = [])
{
// default options
$this->setAttributes([
'imageFillMode' => 'cover', // cover, fill
'order' => 'c_date ASC',
'showLinks' => true,
'template' => 'VerticalBothSides',
'limit' => false
]);
parent::__construct($attributes);
$this->setAttribute('cacheable', 0);
}
/**
* Return the inner body of the element
* Can be overwritten
*
* @return String
*/
$Engine = QUI::getTemplateManager()->getEngine();
$Control = new QUI\Timeline\Controls\Timeline();
$limit = false;
if ($this->getAttribute('limit') >= 1) {
$limit = $this->getAttribute('limit');
$attributes = [
'parentInputList' => $this->getAttribute('site'),
'imageFillMode' => $this->getAttribute('imageFillMode'),
'order' => $this->getAttribute('order'),
'showLinks' => $this->getAttribute('showLinks'),
'display' => $this->getAttribute('template'),
'limit' => $limit,
];
$this->addCSSFiles($Control->getCSSFiles());
$options = [
];
$Engine->assign($options);
return $Engine->fetch(\dirname(__FILE__) . '/Timeline.html');
}