src/Adapter/Modifiers/EntityModifierByCurrentAction.php
public function modifyEntity($parameters, $activeUser, $activePageEntity)
    {
        $this->activePageEntity = $activePageEntity;
        $product = (isset($parameters['product']) && $parameters['product']) ? $parameters['product'] : null;
        $currentController = Registry::getConfig()->getActiveView();
        $controllerName = $this->pageIdentifiers->getCurrentControllerName();

        switch ($controllerName) {
            case 'payment':
                $this->modifyByPaymentController($activeUser);
                break;
            case 'thankyou':
                /** @var \OxidEsales\Eshop\Application\Controller\ThankYouController $currentController */
                $this->modifyByThankYouController(
                    $currentController->getOrder(),
                    $activeUser,
                    $currentController->getBasket()
                );
                break;
            case 'oxwarticledetails':
                $this->modifyByOxwArticleDetailsController($product);
                break;
            case 'search':
                $this->modifyBySearchController();
                break;
            case 'contact':
                $this->modifyByContactController();
                break;
            case 'newsletter':
                $this->modifyByNewsletterController();
                break;
            case 'register':
                $this->modifyByRegisterController($activeUser);
                break;
        }

        return $activePageEntity;
    }
public function modifyEntity($parameters, $activeUser, $activePageEntity)
    {
        $this->activePageEntity = $activePageEntity;
        $product = (isset($parameters['product']) && $parameters['product']) ? $parameters['product'] : null;
        $currentController = Registry::getConfig()->getActiveView();
        $controllerName = $this->pageIdentifiers->getCurrentControllerName();

        switch ($controllerName) {
            case 'payment':
                $this->modifyByPaymentController($activeUser);
                break;
            case 'thankyou':
                /** @var \OxidEsales\Eshop\Application\Controller\ThankYouController $currentController */
                $this->modifyByThankYouController(
                    $currentController->getOrder(),
                    $activeUser,
                    $currentController->getBasket()
                );
                break;
            case 'oxwarticledetails':
                $this->modifyByOxwArticleDetailsController($product);
                break;
            case 'search':
                $this->modifyBySearchController();
                break;
            case 'contact':
                $this->modifyByContactController();
                break;
            case 'newsletter':
                $this->modifyByNewsletterController();
                break;
            case 'register':
                $this->modifyByRegisterController($activeUser);
                break;
        }

        return $activePageEntity;
    }
@param array                     $parameters
@param User                      $activeUser
@param ActivePageEntityInterface $activePageEntity

@return ActivePageEntityInterface