Exclude hotels from maps as configured for teasers

This commit is contained in:
Björn Fromme
2018-09-18 12:56:56 +02:00
parent ce421851f2
commit 1d3c8c7573
2 changed files with 24 additions and 0 deletions
@@ -89,6 +89,9 @@ class MapController extends ActionController
{
/** @var \EP\EpProducts\Domain\Model\Product $product */
$hotel = reset($product->getHotels()->toArray());
if (!$hotel->isShowAsTeaser()) {
continue;
}
$markerData[] = [
'name' => $product->getName(),
'uri' => $this->getUriForPageUid($product->getDetailPage()),
@@ -79,6 +79,11 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
*/
protected $lowContingent = false;
/**
* @var bool
*/
protected $showAsTeaser = false;
/**
* @var int
*/
@@ -292,6 +297,22 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
$this->lowContingent = $lowContingent;
}
/**
* @return bool
*/
public function isShowAsTeaser()
{
return $this->showAsTeaser;
}
/**
* @param bool $showAsTeaser
*/
public function setShowAsTeaser($showAsTeaser)
{
$this->showAsTeaser = $showAsTeaser;
}
/**
* @return int
*/