Skip to content

Commit

Permalink
ENGCOM-1783: Fix minor issues in ui export converter classes #15692
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Idolov authored Jun 6, 2018
2 parents b821f30 + 0b4a3d0 commit eabf3cb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
10 changes: 9 additions & 1 deletion app/code/Magento/Ui/Model/Export/ConvertToCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
namespace Magento\Ui\Model\Export;

use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Exception\FileSystemException;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Filesystem;
use Magento\Framework\Filesystem\Directory\WriteInterface;
use Magento\Ui\Component\MassAction\Filter;

/**
Expand All @@ -16,7 +18,7 @@
class ConvertToCsv
{
/**
* @var DirectoryList
* @var WriteInterface
*/
protected $directory;

Expand All @@ -30,11 +32,17 @@ class ConvertToCsv
*/
protected $pageSize = null;

/**
* @var Filter
*/
protected $filter;

/**
* @param Filesystem $filesystem
* @param Filter $filter
* @param MetadataProvider $metadataProvider
* @param int $pageSize
* @throws FileSystemException
*/
public function __construct(
Filesystem $filesystem,
Expand Down
12 changes: 11 additions & 1 deletion app/code/Magento/Ui/Model/Export/ConvertToXml.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Convert\Excel;
use Magento\Framework\Convert\ExcelFactory;
use Magento\Framework\Exception\FileSystemException;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Filesystem;
use Magento\Framework\Filesystem\Directory\WriteInterface;
use Magento\Ui\Component\MassAction\Filter;

/**
Expand All @@ -20,7 +22,7 @@
class ConvertToXml
{
/**
* @var DirectoryList
* @var WriteInterface
*/
protected $directory;

Expand Down Expand Up @@ -49,12 +51,18 @@ class ConvertToXml
*/
protected $fields;

/**
* @var Filter
*/
protected $filter;

/**
* @param Filesystem $filesystem
* @param Filter $filter
* @param MetadataProvider $metadataProvider
* @param ExcelFactory $excelFactory
* @param SearchResultIteratorFactory $iteratorFactory
* @throws FileSystemException
*/
public function __construct(
Filesystem $filesystem,
Expand Down Expand Up @@ -87,6 +95,7 @@ protected function getOptions()
* Returns DB fields list
*
* @return array
* @throws LocalizedException
*/
protected function getFields()
{
Expand All @@ -102,6 +111,7 @@ protected function getFields()
*
* @param DocumentInterface $document
* @return array
* @throws LocalizedException
*/
public function getRowData(DocumentInterface $document)
{
Expand Down

0 comments on commit eabf3cb

Please sign in to comment.