Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor issues in ui export converter classes #15692

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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