Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions AdobeStockImage/etc/acl.xml

This file was deleted.

14 changes: 0 additions & 14 deletions AdobeStockImage/etc/adminhtml/routes.xml

This file was deleted.

84 changes: 0 additions & 84 deletions AdobeStockImageAdminUi/Block/Adminhtml/Panel.php

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\AdobeStockImageAdminUi\Ui\Component\Listing\Columns;

use Magento\Framework\UrlInterface;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Ui\Component\Listing\Columns\Column;

/**
* Image preview column
*/
class ImagePreview extends Column
{
/**
* @var UrlInterface
*/
private $url;

/**
* @param ContextInterface $context
* @param UiComponentFactory $uiComponentFactory
* @param UrlInterface $url
* @param array $components
* @param array $data
*/
public function __construct(
ContextInterface $context,
UiComponentFactory $uiComponentFactory,
UrlInterface $url,
array $components = [],
array $data = []
) {
parent::__construct($context, $uiComponentFactory, $components, $data);
$this->url = $url;
}
/**
* @inheritdoc
*/
public function prepare()
{
parent::prepare();
$this->setData(
'config',
array_replace_recursive(
(array) $this->getData('config'),
[
'downloadImagePreviewUrl' => $this->url->getUrl('adobe_stock/preview/download'),
'licenseAndDownloadUrl' => $this->url->getUrl('adobe_stock/license/license'),
'confirmationUrl' => $this->url->getUrl('adobe_stock/license/confirmation'),
'relatedImagesUrl' => $this->url->getUrl('adobe_stock/preview/relatedimages'),
'buyCreditsUrl' => 'https://stock.adobe.com/'
]
)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
<referenceContainer name="root">
<block class="Magento\AdobeStockImageAdminUi\Block\Adminhtml\Panel" name="stock.panel" template="Magento_AdobeStockImageAdminUi::panel.phtml" aclResource="Magento_AdobeStockImageAdminUi::save_preview_images">
<block class="Magento\Backend\Block\Template" name="stock.panel" template="Magento_AdobeStockImageAdminUi::panel.phtml" aclResource="Magento_AdobeStockImageAdminUi::save_preview_images">
<block class="Magento\AdobeIms\Block\Adminhtml\SignIn" name="adobe.signIn" template="Magento_AdobeIms::signIn.phtml" aclResource="Magento_AdobeStockImageAdminUi::save_preview_images">
<arguments>
<argument name="configProviders" xsi:type="array">
Expand Down
7 changes: 1 addition & 6 deletions AdobeStockImageAdminUi/view/adminhtml/templates/panel.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@
"stock_panel": {
"component": "Magento_AdobeStockImageAdminUi/panel",
"containerId": "#adobe-stock-images-search-modal",
"masonryComponentPath": "adobe_stock_images_listing.adobe_stock_images_listing.adobe_stock_images_columns",
"downloadPreviewUrl": "<?= /* @noEscape */ $block->getUrl('adobe_stock/preview/download') ?>",
"licenseAndDownloadUrl": "<?= /* @noEscape */ $block->getUrl('adobe_stock/license/license') ?>",
"confirmationUrl": "<?= /* @noEscape */ $block->getUrl('adobe_stock/license/confirmation') ?>",
"relatedImagesUrl": "<?= /* @noEscape */ $block->getUrl('adobe_stock/preview/relatedimages') ?>",
"buyCreditsUrl": "<?= /* @noEscape */ $block->getBuyCreditsUrl() ?>"
"masonryComponentPath": "adobe_stock_images_listing.adobe_stock_images_listing.adobe_stock_images_columns"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
<sortable>false</sortable>
</settings>
</column>
<column name="preview" component="Magento_AdobeStockImageAdminUi/js/components/grid/column/image-preview">
<column name="preview" class="Magento\AdobeStockImageAdminUi\Ui\Component\Listing\Columns\ImagePreview" component="Magento_AdobeStockImageAdminUi/js/components/grid/column/image-preview">
<settings>
<label translate="true">Image Preview</label>
<bodyTmpl>Magento_AdobeStockImageAdminUi/grid/column/image-preview</bodyTmpl>
Expand Down
Loading