getPartialReference example



    protected function assignShop(Log $logEntry, Enlight_Components_Mail $mail): void
    {
        if ($mail->getAssociation(self::SHOP_ASSOCIATION) !== null) {
            $logEntry->setShop($mail->getAssociation(self::SHOP_ASSOCIATION));

            return;
        }

        if ($mail->getAssociation(self::SHOP_ID_ASSOCIATION) !== null) {
            $shop = $this->entityManager->getPartialReference(
                Shop::class,
                $mail->getAssociation(self::SHOP_ID_ASSOCIATION)
            );

            $logEntry->setShop($shop);

            return;
        }

        if ($logEntry->getOrder() !== null && $logEntry->getOrder()->getLanguageSubShop() !== null) {
            $logEntry->setShop($logEntry->getOrder()->getLanguageSubShop());
        }
Home | Imprint | This part of the site doesn't use cookies.