public function getVirtualDocumentListAjaxAction($productId, $pseId)
    {
        $this->checkAuth(AdminResources::PRODUCT, array(), AccessManager::VIEW);
        $this->checkXmlHttpRequest();

        $selectedId = \intval(MetaDataQuery::getVal('virtual', MetaData::PSE_KEY, $pseId));

        $documents = ProductDocumentQuery::create()
            ->filterByProductId($productId)
            ->filterByVisible(0)
            ->orderByPosition()
            ->find()
        ;

        $results = [];

        if (null !== $documents) {
            /** @var ProductDocument $document */
            foreach ($documents as $document) {
                $results[] = [
                    'id'       => $document->getId(),
                    'title'    => $document->getTitle(),
                    'file'     => $document->getFile(),
                    'selected' => ($document->getId() == $selectedId)
                ];
            }
        }

        return $this->jsonResponse(json_encode($results));
    }