Smile\ElasticsuiteVirtualCategory\Model\Preview::getData PHP Method

getData() public method

Load preview data.
public getData ( ) : array
return array
    public function getData()
    {
        $manualSortProductCollection = $this->getManualSortProductCollection();
        $automaticProductCollection = $this->getAutomaticSortProductCollection()->setPageSize($this->size);
        $loadedProducts = array_merge($automaticProductCollection->getItems(), $manualSortProductCollection->getItems());
        return ['products' => $this->loadItems($loadedProducts), 'size' => $automaticProductCollection->getSize()];
    }