/**
* @param int $emotionId
*
* @throws Exception
* @throws Enlight_Controller_Exception
*
* @return LandingPageViewStruct
*/
public function load($emotionId, ShopContextInterface
$context) { $landingPage =
$this->deviceConfiguration->
getLandingPage($emotionId);
$landingPageShops =
$this->deviceConfiguration->
getLandingPageShops($emotionId);
$shopId =
$context->
getShop()->
getId();
$fallbackId =
$context->
getShop()->
getFallbackId();
if (!
$landingPage || !\
in_array($shopId,
$landingPageShops)) { throw new Enlight_Controller_Exception('Landing page missing, non-existent or invalid for the current shop', 404
);
} $translation =
$this->translationComponent->
readWithFallback($shopId,
$fallbackId, 'emotion',
$emotionId);
if (!
empty($translation['name'
])) {