<?php
/**
* Contao Open Source CMS
*
* Copyright (C) 2005-2013 Leo Feyer
*
* @package Comments
* @link https://contao.org
* @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
*/
/**
* Run in a custom namespace, so the class can be replaced
*/
namespace hideaway;
/**
* Class CeHideawayList
*
* @copyright Leo Feyer 2005-2013
* @author Leo Feyer <https://contao.org>
* @package Comments
*/
class CeHideawayList extends \ContentElement
{
/**
* Template
* @var string
*/
protected $strTemplate = 'ce_hideaway_list';
/**
* Display a wildcard in the back end
* @return string
*/
public function generate()
{
if (TL_MODE == 'BE')
{
$objTemplate = new \BackendTemplate('be_wildcard');
$objTemplate->wildcard = '### Hideaway List ###';
$objTemplate->title = $this->headline;
return $objTemplate->parse();
}
return parent::generate();
}
/**
* Generate the module
*/
protected function compile()
{
global $objPage;
$types = unserialize($this->hideaway_types);
$targets = unserialize($this->hideaway_targets);
$this->import('Hideaway');
$experience = $this->Input->get('erlebnis');
$target = $this->Input->get('gruppe');
$feature = $this->Input->get('feature');
$region = $this->Input->get('region');
if ($this->Input->get('type')) $types = explode(',', $this->Input->get('type'));
$o = $this->Hideaway->getList(1, 2, $types, $targets, $region, $feature, $target, $experience, $this->hideaway_highlights);
$this->Template->entries = $o['objs'];
$this->Template->target = $this->Hideaway->getTargetByUrl();
$this->Template->experience = $this->Hideaway->getExperienceByUrl();
$this->Template->dont_modify_meta = $this->hideaway_dont_modify_meta;
}
}