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
framework
View
Asset
PreProcessor
AlternativeSource
AssetBuilder.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\View\Asset\PreProcessor\AlternativeSource
;
7
8
use
Magento\Framework\View\Asset\File
;
9
use
Magento\Framework\View\Asset\Repository
;
10
14
class
AssetBuilder
15
{
19
private
$area;
20
24
private
$theme;
25
29
private
$locale;
30
34
private
$module;
35
39
private
$path;
40
44
private
$repository;
45
51
public
function
__construct
(
Repository
$repository)
52
{
53
$this->repository =
$repository
;
54
}
55
62
public
function
setArea
($area)
63
{
64
$this->area = $area;
65
return
$this;
66
}
67
74
public
function
setTheme
($theme)
75
{
76
$this->theme = $theme;
77
return
$this;
78
}
79
86
public
function
setLocale
($locale)
87
{
88
$this->locale = $locale;
89
return
$this;
90
}
91
98
public
function
setModule
($module)
99
{
100
$this->module = $module;
101
return
$this;
102
}
103
110
public
function
setPath
($path)
111
{
112
$this->path = $path;
113
return
$this;
114
}
115
119
public
function
build
()
120
{
121
$params
= [
122
'area'
=> $this->area,
123
'theme'
=> $this->theme,
124
'locale'
=> $this->locale,
125
'module'
=> $this->module,
126
];
127
128
$asset = $this->repository->createAsset($this->path,
$params
);
129
130
unset($this->path, $this->module, $this->locale, $this->theme, $this->area);
131
132
return
$asset;
133
}
134
}
Magento\Framework\View\Asset\PreProcessor\AlternativeSource\AssetBuilder\setTheme
setTheme($theme)
Definition:
AssetBuilder.php:74
Magento\Framework\View\Asset\PreProcessor\AlternativeSource\AssetBuilder\setLocale
setLocale($locale)
Definition:
AssetBuilder.php:86
Magento\Framework\View\Asset\Repository
Definition:
Repository.php:21
Magento\Framework\View\Asset\PreProcessor\AlternativeSource\AssetBuilder\setPath
setPath($path)
Definition:
AssetBuilder.php:110
Magento\Framework\View\Asset\PreProcessor\AlternativeSource\AssetBuilder\__construct
__construct(Repository $repository)
Definition:
AssetBuilder.php:51
$repository
$repository
Definition:
order_item_with_product_and_custom_options.php:24
Magento\Framework\View\Asset\PreProcessor\AlternativeSource\AssetBuilder\build
build()
Definition:
AssetBuilder.php:119
Magento\Framework\View\Asset\PreProcessor\AlternativeSource\AssetBuilder\setArea
setArea($area)
Definition:
AssetBuilder.php:62
Magento\Framework\View\Asset\File
Definition:
Context.php:7
Magento\Framework\View\Asset\PreProcessor\AlternativeSource
Definition:
AssetBuilder.php:6
Magento\Framework\View\Asset\PreProcessor\AlternativeSource\AssetBuilder\setModule
setModule($module)
Definition:
AssetBuilder.php:98
$params
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition:
website.php:18
Magento\Framework\View\Asset\PreProcessor\AlternativeSource\AssetBuilder
Definition:
AssetBuilder.php:14