system/modules/hideaway/elements/CeHideawayList.php line 53

Open in your IDE?
  1. <?php
  2. /**
  3. * Contao Open Source CMS
  4. *
  5. * Copyright (C) 2005-2013 Leo Feyer
  6. *
  7. * @package Comments
  8. * @link https://contao.org
  9. * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
  10. */
  11. /**
  12. * Run in a custom namespace, so the class can be replaced
  13. */
  14. namespace hideaway;
  15. /**
  16. * Class CeHideawayList
  17. *
  18. * @copyright Leo Feyer 2005-2013
  19. * @author Leo Feyer <https://contao.org>
  20. * @package Comments
  21. */
  22. class CeHideawayList extends \ContentElement
  23. {
  24. /**
  25. * Template
  26. * @var string
  27. */
  28. protected $strTemplate = 'ce_hideaway_list';
  29. /**
  30. * Display a wildcard in the back end
  31. * @return string
  32. */
  33. public function generate()
  34. {
  35. if (TL_MODE == 'BE')
  36. {
  37. $objTemplate = new \BackendTemplate('be_wildcard');
  38. $objTemplate->wildcard = '### Hideaway List ###';
  39. $objTemplate->title = $this->headline;
  40. return $objTemplate->parse();
  41. }
  42. return parent::generate();
  43. }
  44. /**
  45. * Generate the module
  46. */
  47. protected function compile()
  48. {
  49. global $objPage;
  50. $types = unserialize($this->hideaway_types);
  51. $targets = unserialize($this->hideaway_targets);
  52. $this->import('Hideaway');
  53. $experience = $this->Input->get('erlebnis');
  54. $target = $this->Input->get('gruppe');
  55. $feature = $this->Input->get('feature');
  56. $region = $this->Input->get('region');
  57. if ($this->Input->get('type')) $types = explode(',', $this->Input->get('type'));
  58. $o = $this->Hideaway->getList(1, 2, $types, $targets, $region, $feature, $target, $experience, $this->hideaway_highlights);
  59. $this->Template->entries = $o['objs'];
  60. $this->Template->target = $this->Hideaway->getTargetByUrl();
  61. $this->Template->experience = $this->Hideaway->getExperienceByUrl();
  62. $this->Template->dont_modify_meta = $this->hideaway_dont_modify_meta;
  63. }
  64. }