-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1602 from gabrieldagama/introduce-enable-store-vi…
…ew-filters Added Content Status and Store View filters
- Loading branch information
Showing
14 changed files
with
417 additions
and
2 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/ContentField.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\MediaGalleryUi\Model\SearchCriteria\CollectionProcessor\FilterProcessor; | ||
|
||
use Magento\Framework\Api\Filter; | ||
use Magento\Framework\Api\SearchCriteria\CollectionProcessor\FilterProcessor\CustomFilterInterface; | ||
use Magento\Framework\Data\Collection\AbstractDb; | ||
use Magento\MediaContentApi\Api\GetAssetIdsByContentFieldInterface; | ||
|
||
/** | ||
* Class responsible to filter a content field | ||
*/ | ||
class ContentField implements CustomFilterInterface | ||
{ | ||
/** | ||
* @var GetAssetIdsByContentFieldInterface | ||
*/ | ||
private $getAssetIdsByContentStatus; | ||
|
||
/** | ||
* ContentField constructor. | ||
* | ||
* @param GetAssetIdsByContentFieldInterface $getAssetIdsByContentStatus | ||
*/ | ||
public function __construct( | ||
GetAssetIdsByContentFieldInterface $getAssetIdsByContentStatus | ||
) { | ||
$this->getAssetIdsByContentStatus = $getAssetIdsByContentStatus; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function apply(Filter $filter, AbstractDb $collection): bool | ||
{ | ||
$collection->addFieldToFilter( | ||
'main_table.id', | ||
['in' => $this->getAssetIdsByContentStatus->execute($filter->getField(), $filter->getValue())] | ||
); | ||
|
||
return true; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
MediaGalleryUi/Test/Mftf/ActionGroup/AdminMediaGalleryApplySelectFilterActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminMediaGalleryApplySelectFilterActionGroup"> | ||
<annotations> | ||
<description>Applies select filter to the media gallery grid</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="filterLabel" type="string"/> | ||
<argument name="optionLabel" type="string"/> | ||
</arguments> | ||
|
||
<click selector="{{AdminEnhancedMediaGalleryFiltersSection.selectFilter(filterLabel)}}" stepKey="openSelectFilter"/> | ||
<click selector="{{AdminEnhancedMediaGalleryFiltersSection.selectFilterOption(filterLabel, optionLabel)}}" stepKey="selectFilterOption"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryDisabledContentFilterTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminMediaGalleryDisabledContentFilterTest"> | ||
<annotations> | ||
<features value="MediaGallery"/> | ||
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1464"/> | ||
<title value="User filter asset by disabled content"/> | ||
<stories value="Story 57: User filters images by the area they used in"/> | ||
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1320712/scenarios/4970565"/> | ||
<description value="User filter asset by disabled content"/> | ||
<severity value="CRITICAL"/> | ||
<group value="media_gallery_ui"/> | ||
</annotations> | ||
<before> | ||
<createData entity="SimpleSubCategory" stepKey="category"/> | ||
<magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"/> | ||
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> | ||
<magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> | ||
<deleteData createDataKey="category" stepKey="deleteCategory"/> | ||
</after> | ||
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> | ||
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> | ||
<argument name="category" value="$$category$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectImageInGrid"> | ||
<argument name="imageName" value="{{ImageUpload.file}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedImage"/> | ||
<actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOkButton"/> | ||
<scrollToTopOfPage stepKey="scrollToTop"/> | ||
<actionGroup ref="AdminEnableCategoryActionGroup" stepKey="disableCategory"/> | ||
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> | ||
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> | ||
<actionGroup ref="AdminMediaGalleryApplySelectFilterActionGroup" stepKey="selectFilterOption"> | ||
<argument name="filterLabel" value="Content Status"/> | ||
<argument name="optionLabel" value="Disabled"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminEnhancedMediaGalleryApplyFiltersActionGroup" stepKey="applyFilters"/> | ||
<actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGrid"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
57 changes: 57 additions & 0 deletions
57
MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryEnabledContentFilterTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminMediaGalleryEnabledContentFilterTest"> | ||
<annotations> | ||
<features value="MediaGallery"/> | ||
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1464"/> | ||
<title value="User filter asset by enabled content"/> | ||
<stories value="Story 57: User filters images by the area they used in"/> | ||
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1320712/scenarios/4970565"/> | ||
<description value="User filter asset by enabled content"/> | ||
<severity value="CRITICAL"/> | ||
<group value="media_gallery_ui"/> | ||
</annotations> | ||
<before> | ||
<createData entity="SimpleSubCategory" stepKey="category"/> | ||
<magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"/> | ||
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> | ||
<magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> | ||
<deleteData createDataKey="category" stepKey="deleteCategory"/> | ||
</after> | ||
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> | ||
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> | ||
<argument name="category" value="$$category$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectImageInGrid"> | ||
<argument name="imageName" value="{{ImageUpload.file}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedImage"/> | ||
<actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOkButton"/> | ||
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> | ||
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> | ||
<actionGroup ref="AdminMediaGalleryApplySelectFilterActionGroup" stepKey="selectFilterOption"> | ||
<argument name="filterLabel" value="Content Status"/> | ||
<argument name="optionLabel" value="Enabled"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminEnhancedMediaGalleryApplyFiltersActionGroup" stepKey="applyFilters"/> | ||
<actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGrid"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
57 changes: 57 additions & 0 deletions
57
MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryStoreViewCategoryFilterTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminMediaGalleryStoreViewCategoryFilterTest"> | ||
<annotations> | ||
<features value="MediaGallery"/> | ||
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1464"/> | ||
<title value="User filter asset by category store view"/> | ||
<stories value="Story 57: User filters images by the area they used in"/> | ||
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1320712/scenarios/4970870"/> | ||
<description value="User filter asset by category store view"/> | ||
<severity value="CRITICAL"/> | ||
<group value="media_gallery_ui"/> | ||
</annotations> | ||
<before> | ||
<createData entity="SimpleSubCategory" stepKey="category"/> | ||
<magentoCLI command="config:set cms/wysiwyg/enabled enabled" stepKey="enableWYSIWYG"/> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"/> | ||
<magentoCLI command="config:set cms/wysiwyg/enabled disabled" stepKey="disableWYSIWYG"/> | ||
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> | ||
<deleteData createDataKey="category" stepKey="deleteCategory"/> | ||
</after> | ||
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/> | ||
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory"> | ||
<argument name="category" value="$$category$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminOpenMediaGalleryTinyMce4ActionGroup" stepKey="openMediaGalleryFromWysiwyg"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectImageInGrid"> | ||
<argument name="imageName" value="{{ImageUpload.file}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedImage"/> | ||
<actionGroup ref="AdminMediaGalleryClickOkButtonTinyMce4ActionGroup" stepKey="clickOkButton"/> | ||
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategory"/> | ||
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> | ||
<actionGroup ref="AdminMediaGalleryApplySelectFilterActionGroup" stepKey="selectFilterOption"> | ||
<argument name="filterLabel" value="Store View"/> | ||
<argument name="optionLabel" value="Main Website/Main Website Store/Default Store View"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminEnhancedMediaGalleryApplyFiltersActionGroup" stepKey="applyFilters"/> | ||
<actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGrid"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
55 changes: 55 additions & 0 deletions
55
MediaGalleryUi/Test/Mftf/Test/AdminMediaGalleryStoreViewContentFilterTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminMediaGalleryStoreViewContentFilterTest"> | ||
<annotations> | ||
<features value="MediaGallery"/> | ||
<useCaseId value="https://github.com/magento/adobe-stock-integration/issues/1464"/> | ||
<title value="User filter asset by content store view"/> | ||
<stories value="Story 57: User filters images by the area they used in"/> | ||
<testCaseId value="https://studio.cucumber.io/projects/131313/test-plan/folders/1320712/scenarios/4970870"/> | ||
<description value="User filter asset by content store view"/> | ||
<severity value="CRITICAL"/> | ||
<group value="media_gallery_ui"/> | ||
</annotations> | ||
<before> | ||
<createData entity="_defaultCmsPage" stepKey="createCMSPage" /> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="AdminEnhancedMediaGalleryImageDeleteActionGroup" stepKey="deleteImage"/> | ||
<actionGroup ref="ResetAdminDataGridToDefaultViewActionGroup" stepKey="resetAdminDataGridToDefaultView"/> | ||
<deleteData createDataKey="createCMSPage" stepKey="deleteCmsPage"/> | ||
</after> | ||
<actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage"> | ||
<argument name="CMSPage" value="$$createCMSPage$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminOpenMediaGalleryFromPageNoEditorActionGroup" stepKey="openMediaGallery"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickImageInGridActionGroup" stepKey="selectImageInGrid"> | ||
<argument name="imageName" value="{{ImageUpload.file}}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminMediaGalleryClickAddSelectedActionGroup" stepKey="clickAddSelectedImage"/> | ||
<scrollToTopOfPage stepKey="scrollToTop"/> | ||
<click selector="{{CmsNewPagePageActionsSection.saveAndContinueEdit}}" stepKey="clickSavePage"/> | ||
<waitForPageLoad stepKey="waitForPageSave"/> | ||
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openStandaloneMediaGallery"/> | ||
<actionGroup ref="AdminEnhancedMediaGalleryExpandFilterActionGroup" stepKey="expandFilters"/> | ||
<actionGroup ref="AdminMediaGalleryApplySelectFilterActionGroup" stepKey="selectFilterOption"> | ||
<argument name="filterLabel" value="Store View"/> | ||
<argument name="optionLabel" value="Main Website/Main Website Store/Default Store View"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminEnhancedMediaGalleryApplyFiltersActionGroup" stepKey="applyFilters"/> | ||
<actionGroup ref="AdminMediaGalleryAssertImageInGridActionGroup" stepKey="assertImageInGrid"> | ||
<argument name="image" value="ImageUpload"/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
27 changes: 27 additions & 0 deletions
27
MediaGalleryUi/Ui/Component/Listing/Filters/Options/Status.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\MediaGalleryUi\Ui\Component\Listing\Filters\Options; | ||
|
||
use Magento\Framework\Data\OptionSourceInterface; | ||
|
||
/** | ||
* Status filter options | ||
*/ | ||
class Status implements OptionSourceInterface | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
public function toOptionArray(): array | ||
{ | ||
return [ | ||
['value' => '1', 'label' => __('Enabled')], | ||
['value' => '0', 'label' => __('Disabled')] | ||
]; | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
MediaGalleryUi/Ui/Component/Listing/Filters/Options/Store.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\MediaGalleryUi\Ui\Component\Listing\Filters\Options; | ||
|
||
use Magento\Store\Ui\Component\Listing\Column\Store\Options as StoreOptions; | ||
|
||
/** | ||
* Store Options for content field | ||
*/ | ||
class Store extends StoreOptions | ||
{ | ||
/** | ||
* All Store Views value | ||
*/ | ||
const ALL_STORE_VIEWS = '0'; | ||
|
||
/** | ||
* Get options | ||
* | ||
* @return array | ||
*/ | ||
public function toOptionArray() | ||
{ | ||
if ($this->options !== null) { | ||
return $this->options; | ||
} | ||
|
||
$this->currentOptions['All Store Views']['label'] = __('All Store Views'); | ||
$this->currentOptions['All Store Views']['value'] = self::ALL_STORE_VIEWS; | ||
|
||
$this->generateCurrentOptions(); | ||
|
||
$this->options = array_values($this->currentOptions); | ||
|
||
return $this->options; | ||
} | ||
} |
Oops, something went wrong.