Skip to content

Commit efc0972

Browse files
committed
Remove Source filter
1 parent ca076e6 commit efc0972

File tree

5 files changed

+37
-49
lines changed

5 files changed

+37
-49
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\AdobeStockImageAdminUi\Plugin;
10+
11+
use Magento\MediaGalleryUi\Ui\Component\Listing\Columns\Source\Options;
12+
13+
/**
14+
* Plugin which adds an Adobe Stock option to surce filter in media gallery
15+
*/
16+
class AddAdobeStockSourceOptionPlugin
17+
{
18+
/**
19+
* Add Adobe Stock source option
20+
*
21+
* @param Options $subject
22+
* @param array $options
23+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
24+
*/
25+
public function aftertoOptionArray(Options $subject, array $options): array
26+
{
27+
$options[] = [
28+
'value' => 'Adobe Stock',
29+
'label' => __('Adobe Stock'),
30+
];
31+
32+
return $options;
33+
}
34+
}

AdobeStockImageAdminUi/Ui/Component/Listing/Columns/Source/Options.php

Lines changed: 0 additions & 33 deletions
This file was deleted.

AdobeStockImageAdminUi/etc/adminhtml/di.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<type name="Magento\MediaGalleryUi\Model\GetDetailsByAssetId">
1313
<plugin name="add_adobe_stock_image_details_plugin" type="Magento\AdobeStockImageAdminUi\Plugin\AddAdobeStockImageDetailsPlugin"/>
1414
</type>
15+
<type name="Magento\MediaGalleryUi\Ui\Component\Listing\Columns\Source\Options">
16+
<plugin name="add_adobe_stock_source_option_plugin" type="Magento\AdobeStockImageAdminUi\Plugin\AddAdobeStockSourceOptionPlugin"/>
17+
</type>
1518
<type name="Magento\MediaGalleryUi\Ui\Component\Listing\Columns\SourceIconProvider">
1619
<arguments>
1720
<argument name="sourceIcons" xsi:type="array">

AdobeStockImageAdminUi/view/adminhtml/ui_component/media_gallery_listing.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@
2222
<dataScope>is_licensed</dataScope>
2323
</settings>
2424
</filterSelect>
25-
<filterSelect name="source" provider="${ $.parentName }" sortOrder="30">
26-
<settings>
27-
<caption translate="true">All</caption>
28-
<options class="Magento\AdobeStockImageAdminUi\Ui\Component\Listing\Columns\Source\Options"/>
29-
<label translate="true">Source</label>
30-
<dataScope>source</dataScope>
31-
</settings>
32-
</filterSelect>
3325
</filters>
3426
</listingToolbar>
3527
<columns name="media_gallery_columns">

AdobeStockImageAdminUi/view/adminhtml/ui_component/standalone_media_gallery_listing.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@
2222
<dataScope>is_licensed</dataScope>
2323
</settings>
2424
</filterSelect>
25-
<filterSelect name="source" provider="${ $.parentName }" sortOrder="30">
26-
<settings>
27-
<caption translate="true">All</caption>
28-
<options class="Magento\AdobeStockImageAdminUi\Ui\Component\Listing\Columns\Source\Options"/>
29-
<label translate="true">Source</label>
30-
<dataScope>source</dataScope>
31-
</settings>
32-
</filterSelect>
3325
</filters>
3426
</listingToolbar>
3527
<columns name="media_gallery_columns">

0 commit comments

Comments
 (0)