Skip to content
Snippets Groups Projects
Commit bbeed47c authored by Maxim Medinskiy's avatar Maxim Medinskiy
Browse files

MAGETWO-35088: Page and Block Data and Repository Interfaces

parent 594b7ff2
No related merge requests found
......@@ -188,7 +188,7 @@ class Listing extends AbstractView
public function getCollectionItems()
{
$items = [];
$collection = $this->getDataCollection()->getResultCollection();
$collection = $this->getDataCollection();
foreach ($collection->getItems() as $item) {
$actualFields = [];
$itemsData = $this->getDataFromDataProvider($item->getData());
......@@ -230,8 +230,8 @@ class Listing extends AbstractView
);
$this->renderContext->getStorage()->addGlobalData('dump', ['extenders' => []]);
$collection = $this->getDataCollection()->getResultCollection();
$totalCount = $collection->getTotalCount();
$collection = $this->getDataCollection();
$totalCount = $collection->count();
$this->renderContext->getStorage()->addDataSource(
$this->getName(),
[
......
......@@ -37,7 +37,10 @@ class Paging extends AbstractView
$offset = $this->renderContext->getRequestParam('page', $defaultPage);
$defaultLimit = $this->config->getData('pageSize');
$size = $this->renderContext->getRequestParam('limit', $defaultLimit);
$this->renderContext->getStorage()->getDataCollection($this->getParentName())->setLimit($offset, $size);
$this->renderContext->getStorage()
->getDataCollection($this->getParentName())
->setPageSize($size)
->setCurPage($offset);
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment