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
Theme
UploadCss.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Theme\Controller\Adminhtml\System\Design\Theme
;
8
13
class
UploadCss
extends
\Magento\Theme\Controller\Adminhtml\System\Design\Theme
14
{
20
public
function
execute
()
21
{
23
$serviceModel = $this->_objectManager->get(\
Magento
\
Theme
\Model\Uploader\Service::class);
24
try
{
25
$cssFileContent = $serviceModel->uploadCssFile(
'css_file_uploader'
);
26
$result
= [
'error'
=>
false
,
'content'
=> $cssFileContent[
'content'
]];
27
}
catch
(\
Magento
\Framework\Exception\LocalizedException $e) {
28
$result
= [
'error'
=>
true
,
'message'
=> $e->getMessage()];
29
}
catch
(\Exception $e) {
30
$result
= [
'error'
=>
true
,
'message'
=>
__
(
'We can\'t upload the CSS file right now.'
)];
31
$this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
32
}
33
$this->
getResponse
()->representJson(
34
$this->_objectManager->get(\
Magento
\Framework\Json\Helper\Data::class)->jsonEncode(
$result
)
35
);
36
}
37
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Framework\App\Action\AbstractAction\getResponse
getResponse()
Definition:
AbstractAction.php:70
Magento\Theme\Controller\Adminhtml\System\Design\Theme
Definition:
Theme.php:12
__
__()
Definition:
__.php:13
Magento\Framework\App\ActionInterface\execute
execute()
Magento\Theme\Controller\Adminhtml\System\Design\Theme
Definition:
Delete.php:7
Magento
Magento\Theme\Controller\Adminhtml\System\Design\Theme\UploadCss
Definition:
UploadCss.php:13