Exclude hotels from maps as configured for teasers
This commit is contained in:
@@ -89,6 +89,9 @@ class MapController extends ActionController
|
|||||||
{
|
{
|
||||||
/** @var \EP\EpProducts\Domain\Model\Product $product */
|
/** @var \EP\EpProducts\Domain\Model\Product $product */
|
||||||
$hotel = reset($product->getHotels()->toArray());
|
$hotel = reset($product->getHotels()->toArray());
|
||||||
|
if (!$hotel->isShowAsTeaser()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$markerData[] = [
|
$markerData[] = [
|
||||||
'name' => $product->getName(),
|
'name' => $product->getName(),
|
||||||
'uri' => $this->getUriForPageUid($product->getDetailPage()),
|
'uri' => $this->getUriForPageUid($product->getDetailPage()),
|
||||||
|
|||||||
@@ -79,6 +79,11 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
*/
|
*/
|
||||||
protected $lowContingent = false;
|
protected $lowContingent = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected $showAsTeaser = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
@@ -292,6 +297,22 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
$this->lowContingent = $lowContingent;
|
$this->lowContingent = $lowContingent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isShowAsTeaser()
|
||||||
|
{
|
||||||
|
return $this->showAsTeaser;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $showAsTeaser
|
||||||
|
*/
|
||||||
|
public function setShowAsTeaser($showAsTeaser)
|
||||||
|
{
|
||||||
|
$this->showAsTeaser = $showAsTeaser;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user