Skip to content

Commit

Permalink
Add functions import
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 committed Jul 7, 2024
1 parent 71dd2a3 commit b27049c
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Controller/Adminhtml/Export/CategoryDownload.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
use Magento\Framework\Phrase;
use Opengento\CategoryImportExport\Model\Session\DownloadContext;

use function basename;

class CategoryDownload extends Action implements HttpGetActionInterface
{
public const ADMIN_RESOURCE = 'Opengento_CategoryImportExport::export';
Expand Down
2 changes: 2 additions & 0 deletions Model/Config/Source/Category/Attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
use Magento\Framework\Data\OptionSourceInterface;
use Magento\Framework\Exception\LocalizedException;

use function sprintf;

class Attributes implements OptionSourceInterface
{
private const EXCLUDE_ATTRIBUTES = [
Expand Down
2 changes: 2 additions & 0 deletions Model/Export/Categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
use Magento\Store\Model\StoreManagerInterface;
use Opengento\CategoryImportExport\Model\Import\Categories as ImportCategories;

use function array_unshift;

class Categories
{
public function __construct(
Expand Down
5 changes: 5 additions & 0 deletions Model/Export/ToCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
use Magento\Framework\Filesystem;
use Opengento\CategoryImportExport\Model\Csv\Options;

use function array_keys;
use function array_merge;
use function array_unshift;
use function time;

class ToCsv
{
public function __construct(
Expand Down
3 changes: 3 additions & 0 deletions Model/Import/FromCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
use Magento\Framework\File\Csv;
use Opengento\CategoryImportExport\Model\Csv\Options;

use function array_combine;
use function array_shift;

class FromCsv
{
public function __construct(
Expand Down
2 changes: 0 additions & 2 deletions Setup/Patch/Data/AddCategoryCodeAttributeV1.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Zend_Validate_Exception;

class AddCategoryCodeAttributeV1 implements DataPatchInterface
{
Expand All @@ -32,7 +31,6 @@ public function getAliases(): array

/**
* @throws LocalizedException
* @throws Zend_Validate_Exception
*/
public function apply(): self
{
Expand Down
3 changes: 3 additions & 0 deletions Setup/Patch/Data/PopulateCategoryCodeV1.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory;
use Magento\Framework\Setup\Patch\DataPatchInterface;

use function str_replace;
use function strtolower;

class PopulateCategoryCodeV1 implements DataPatchInterface
{
public function __construct(
Expand Down
2 changes: 2 additions & 0 deletions Ui/Component/Form/Button/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
use Opengento\CategoryImportExport\Model\Session\DownloadContext;

use function sprintf;

class Download implements ButtonProviderInterface
{
public function __construct(
Expand Down

0 comments on commit b27049c

Please sign in to comment.