Skip to content

Commit 43db2fd

Browse files
authored
Merge pull request #1701 from sivaschenko/removed-media-modules
Media modules moved to magento2 repo
2 parents 3015c1f + 7e179f5 commit 43db2fd

File tree

521 files changed

+419
-23987
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

521 files changed

+419
-23987
lines changed

.coveralls.yml

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

.travis.yml

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

AdobeStockAdminUi/Block/Adminhtml/System/Config/TestConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
use Magento\AdobeImsApi\Api\ConfigInterface;
1212
use Magento\AdobeStockClientApi\Api\ClientInterface;
13-
use Magento\Config\Block\System\Config\Form\Field;
1413
use Magento\Backend\Block\Template\Context;
14+
use Magento\Config\Block\System\Config\Form\Field;
1515
use Magento\Framework\Data\Form\Element\AbstractElement;
1616

1717
/**

AdobeStockAdminUi/Controller/Adminhtml/System/Config/TestConnection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
namespace Magento\AdobeStockAdminUi\Controller\Adminhtml\System\Config;
1010

11-
use Magento\AdobeStockClientApi\Api\ClientInterface;
1211
use Magento\AdobeImsApi\Api\ConfigInterface;
12+
use Magento\AdobeStockClientApi\Api\ClientInterface;
1313
use Magento\Backend\App\Action;
1414
use Magento\Backend\App\Action\Context;
1515
use Magento\Framework\App\Action\HttpGetActionInterface;
@@ -88,7 +88,7 @@ public function execute() : ResultInterface
8888
$message = __('An error occurred during test Adobe Stock API connection');
8989
$isConnectionEstablished = false;
9090
}
91-
/** @var Json $resultJson */
91+
9292
$resultJson = $this->resultJsonFactory->create();
9393
return $resultJson->setData(
9494
[

AdobeStockAdminUi/view/adminhtml/web/template/connection.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
*/
66
-->
77
<div if="visible" attr="class: messageClass" translate="message"></div>
8-
<button class="scalable" type="button" data-bind="click: testConnection" data-ui-id="adobe-stock-integration-buttons-test-connection">
8+
<button class="scalable" type="button" click="testConnection" data-ui-id="adobe-stock-integration-buttons-test-connection">
99
<span text="buttonLabel"></span>
1010
</button>

AdobeStockAsset/Model/AppendAttributes.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Magento\Framework\Api\AttributeValueFactory;
1212
use Magento\Framework\Api\Search\Document;
1313
use Magento\Framework\Api\Search\SearchResultInterface;
14-
use Magento\MediaGalleryApi\Model\Asset\Command\GetByIdInterface;
14+
use Magento\MediaGalleryApi\Api\GetAssetsByIdsInterface;
1515

1616
/**
1717
* Class is used for adding an additional assets attributes such as is_downloaded or path to the search results
@@ -33,23 +33,23 @@ class AppendAttributes
3333
private $loadByIds;
3434

3535
/**
36-
* @var GetByIdInterface
36+
* @var GetAssetsByIdsInterface
3737
*/
38-
private $getMediaGalleryAssetById;
38+
private $getMediaGalleryAssetsByIds;
3939

4040
/**
4141
* @param AttributeValueFactory $attributeValueFactory
4242
* @param LoadByIdsInterface $loadByIds
43-
* @param GetByIdInterface $getMediaGalleryAssetById
43+
* @param GetAssetsByIdsInterface $getMediaGalleryAssetById
4444
*/
4545
public function __construct(
4646
AttributeValueFactory $attributeValueFactory,
4747
LoadByIdsInterface $loadByIds,
48-
GetByIdInterface $getMediaGalleryAssetById
48+
GetAssetsByIdsInterface $getMediaGalleryAssetById
4949
) {
5050
$this->attributeValueFactory = $attributeValueFactory;
5151
$this->loadByIds = $loadByIds;
52-
$this->getMediaGalleryAssetById = $getMediaGalleryAssetById;
52+
$this->getMediaGalleryAssetsByIds = $getMediaGalleryAssetById;
5353
}
5454

5555
/**
@@ -89,9 +89,9 @@ static function ($item) {
8989
continue;
9090
}
9191

92-
$path = $this->getMediaGalleryAssetById->execute(
93-
$assets[$item->getId()]->getMediaGalleryId()
94-
)->getPath();
92+
$path = $this->getMediaGalleryAssetsByIds->execute(
93+
[$assets[$item->getId()]->getMediaGalleryId()]
94+
)[0]->getPath();
9595

9696
$this->addAttributes(
9797
$item,

AdobeStockAsset/Model/AssetRepository.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
use Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface;
2121
use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
2222
use Magento\Framework\Api\SearchCriteriaInterface;
23-
use Magento\Framework\Exception\IntegrationException;
2423
use Magento\Framework\Exception\LocalizedException;
2524
use Magento\Framework\Exception\NoSuchEntityException;
2625
use Psr\Log\LoggerInterface;
@@ -117,7 +116,6 @@ public function save(AssetInterface $asset): void
117116
public function getList(SearchCriteriaInterface $searchCriteria): AssetSearchResultsInterface
118117
{
119118
try {
120-
/** @var AssetCollection $collection */
121119
$collection = $this->collectionFactory->create();
122120
$this->joinProcessor->process(
123121
$collection,
@@ -126,7 +124,6 @@ public function getList(SearchCriteriaInterface $searchCriteria): AssetSearchRes
126124

127125
$this->collectionProcessor->process($searchCriteria, $collection);
128126

129-
/** @var AssetSearchResultsInterface $searchResults */
130127
$searchResults = $this->searchResultFactory->create();
131128
$searchResults->setItems($collection->getItems());
132129
$searchResults->setSearchCriteria($searchCriteria);

AdobeStockAsset/Model/CategoryRepository.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
namespace Magento\AdobeStockAsset\Model;
1010

11-
use Magento\AdobeStockAssetApi\Model\Category\Command\SaveInterface;
12-
use Magento\AdobeStockAssetApi\Model\Category\Command\LoadByIdInterface;
13-
use Magento\AdobeStockAssetApi\Model\Category\Command\DeleteByIdInterface;
1411
use Magento\AdobeStockAsset\Model\ResourceModel\Category\Collection as CategoryCollection;
1512
use Magento\AdobeStockAsset\Model\ResourceModel\Category\CollectionFactory as CategoryCollectionFactory;
1613
use Magento\AdobeStockAssetApi\Api\CategoryRepositoryInterface;
1714
use Magento\AdobeStockAssetApi\Api\Data\CategoryInterface;
1815
use Magento\AdobeStockAssetApi\Api\Data\CategorySearchResultsInterface;
1916
use Magento\AdobeStockAssetApi\Api\Data\CategorySearchResultsInterfaceFactory;
17+
use Magento\AdobeStockAssetApi\Model\Category\Command\DeleteByIdInterface;
18+
use Magento\AdobeStockAssetApi\Model\Category\Command\LoadByIdInterface;
19+
use Magento\AdobeStockAssetApi\Model\Category\Command\SaveInterface;
2020
use Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface;
2121
use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
2222
use Magento\Framework\Api\SearchCriteriaInterface;
@@ -116,7 +116,6 @@ public function delete(CategoryInterface $item): void
116116
*/
117117
public function getList(SearchCriteriaInterface $searchCriteria) : CategorySearchResultsInterface
118118
{
119-
/** @var CategoryCollection $collection */
120119
$collection = $this->collectionFactory->create();
121120
$this->joinProcessor->process(
122121
$collection,
@@ -125,7 +124,6 @@ public function getList(SearchCriteriaInterface $searchCriteria) : CategorySearc
125124

126125
$this->collectionProcessor->process($searchCriteria, $collection);
127126

128-
/** @var CategorySearchResultsInterface $searchResults */
129127
$searchResults = $this->searchResultFactory->create();
130128
$searchResults->setItems($collection->getItems());
131129
$searchResults->setSearchCriteria($searchCriteria);

AdobeStockAsset/Model/CreatorRepository.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ public function delete(CreatorInterface $item): void
113113
*/
114114
public function getList(SearchCriteriaInterface $searchCriteria) : CreatorSearchResultsInterface
115115
{
116-
/** @var CreatorCollection $collection */
117116
$collection = $this->collectionFactory->create();
118117
$this->joinProcessor->process(
119118
$collection,
@@ -122,7 +121,6 @@ public function getList(SearchCriteriaInterface $searchCriteria) : CreatorSearch
122121

123122
$this->collectionProcessor->process($searchCriteria, $collection);
124123

125-
/** @var CreatorSearchResultsInterface $searchResults */
126124
$searchResults = $this->searchResultFactory->create();
127125
$searchResults->setItems($collection->getItems());
128126
$searchResults->setSearchCriteria($searchCriteria);

AdobeStockAsset/Model/GetAssetById.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77

88
namespace Magento\AdobeStockAsset\Model;
99

10+
use Magento\AdobeStockAssetApi\Api\GetAssetByIdInterface;
1011
use Magento\AdobeStockAssetApi\Api\GetAssetListInterface;
1112
use Magento\Framework\Api\FilterBuilder;
1213
use Magento\Framework\Api\Search\Document;
1314
use Magento\Framework\Api\Search\SearchCriteriaBuilder;
14-
use Magento\AdobeStockAssetApi\Api\GetAssetByIdInterface;
1515
use Magento\Framework\Exception\NoSuchEntityException;
16-
use Magento\Framework\Exception\NotFoundException;
1716

1817
/**
1918
* Service for getting asset by content id

0 commit comments

Comments
 (0)