Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-theme
Controller
Adminhtml
System
Design
Wysiwyg
Files
PreviewImage.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Theme\Controller\Adminhtml\System\Design\Wysiwyg\Files
;
8
9
use
Magento\Framework\App\ResponseInterface
;
10
use
Magento\Framework\App\Filesystem\DirectoryList
;
11
12
class
PreviewImage
extends
\Magento\Theme\Controller\Adminhtml\System\Design\Wysiwyg\Files
13
{
19
public
function
execute
()
20
{
21
$file = $this->
getRequest
()->getParam(
'file'
);
23
$helper
= $this->_objectManager->get(\
Magento
\
Theme
\Helper\Storage::class);
24
try
{
25
return
$this->_fileFactory->create(
26
$file,
27
[
'type'
=>
'filename'
,
'value'
=>
$helper
->getThumbnailPath($file)],
28
DirectoryList::MEDIA
29
);
30
}
catch
(\Exception $e) {
31
$this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
32
$this->
_redirect
(
'core/index/notFound'
);
33
}
34
}
35
}
$helper
$helper
Definition:
iframe.phtml:13
Magento\Backend\App\AbstractAction\_redirect
_redirect($path, $arguments=[])
Definition:
AbstractAction.php:316
Magento\Theme\Controller\Adminhtml\System\Design\Theme
Definition:
Theme.php:12
Magento\Theme\Controller\Adminhtml\System\Design\Wysiwyg\Files
Definition:
Contents.php:7
Magento\Framework\App\Action\AbstractAction\getRequest
getRequest()
Definition:
AbstractAction.php:60
Magento\Framework\App\ActionInterface\execute
execute()
Magento\Theme\Controller\Adminhtml\System\Design\Wysiwyg\Files\PreviewImage
Definition:
PreviewImage.php:12
Magento
Magento\Theme\Controller\Adminhtml\System\Design\Wysiwyg\Files
Definition:
Files.php:12
Magento\Framework\App\Filesystem\DirectoryList
Definition:
DirectoryList.php:13
Magento\Framework\App\ResponseInterface
Definition:
ResponseInterface.php:14