src/Adapter/Modifiers/EntityModifierByCurrentBasketAction.php
public function modifyEntity($activePageEntity)
    {
        $this->pageEntity = $activePageEntity;
        // get the last Call for special handling function "tobasket", "changebasket"
        if (($lastCall = Registry::getSession()->getVariable('aLastcall'))) {
            Registry::getSession()->deleteVariable('aLastcall');
        }

        // ADD To Basket and Remove from Basket
        if (is_array($lastCall) && count($lastCall)) {
            $callAction = key($lastCall);
            $callData = current($lastCall);

            switch ($callAction) {
                case 'changebasket':
                    $this->changeBasketAction($callData);
                    break;
                case 'tobasket':
                    $this->toBasketAction($callData);
                    break;
            }
        }

        return $this->pageEntity;
    }
public function modifyEntity($activePageEntity)
    {
        $this->pageEntity = $activePageEntity;
        // get the last Call for special handling function "tobasket", "changebasket"
        if (($lastCall = Registry::getSession()->getVariable('aLastcall'))) {
            Registry::getSession()->deleteVariable('aLastcall');
        }

        // ADD To Basket and Remove from Basket
        if (is_array($lastCall) && count($lastCall)) {
            $callAction = key($lastCall);
            $callData = current($lastCall);

            switch ($callAction) {
                case 'changebasket':
                    $this->changeBasketAction($callData);
                    break;
                case 'tobasket':
                    $this->toBasketAction($callData);
                    break;
            }
        }

        return $this->pageEntity;
    }
@param ActivePageEntityInterface $activePageEntity

@return ActivePageEntityInterface