<?php /** * Slick slider for Contao * * Copyright (c) 2016 Benjamin Roth * * @license LGPL-3.0+ */ namespace eSM_slick; /** * Front end content element slick slider start. */ class ContentSlickSliderSlideStart extends \ContentElement { /** * Template * @var string */ protected $strTemplate = 'slide_start_default'; /** * Generate the content element */ protected function compile() { if (TL_MODE == 'BE') { $this->strTemplate = 'be_wildcard'; /** @var \BackendTemplate|object $objTemplate */ $objTemplate = new \BackendTemplate($this->strTemplate); $this->Template = $objTemplate; } if ($this->singleSRC) { $objFile = \FilesModel::findByUuid($this->singleSRC); if ($objFile !== null && is_file(TL_ROOT . '/' . $objFile->path)) { $this->singleSRC = $objFile->path; $this->addImageToTemplate($this->Template, array('singleSRC'=>$this->singleSRC, 'size'=>$this->size)); } } } }