File tree Expand file tree Collapse file tree 5 files changed +37
-49
lines changed
Ui/Component/Listing/Columns/Source
view/adminhtml/ui_component Expand file tree Collapse file tree 5 files changed +37
-49
lines changed Original file line number Diff line number Diff line change 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+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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" >
Original file line number Diff line number Diff line change 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" >
Original file line number Diff line number Diff line change 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" >
You can’t perform that action at this time.
0 commit comments