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.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\View
;
7
8
use
Magento\Framework\View\Asset\Repository
;
9
10
class
Asset
11
{
15
private
$fileName;
16
20
private
$sourcePath;
21
25
protected
$module
;
26
30
protected
$area
;
31
35
protected
$theme
;
36
40
protected
$locale
;
41
45
private
$extension;
46
56
public
function
__construct
(
57
$fileName,
58
$sourcePath =
null
,
59
$area
=
null
,
60
$theme
=
null
,
61
$locale
=
null
,
62
$module
=
null
63
) {
64
$this->fileName = $fileName;
65
$this->sourcePath = $sourcePath;
66
$this->module =
$module
;
67
$this->area =
$area
;
68
$this->theme =
$theme
;
69
$this->locale =
$locale
;
70
}
71
75
public
function
getFileName
()
76
{
77
return
$this->fileName;
78
}
79
83
public
function
getFileId
()
84
{
85
if
($this->
getModule
()) {
86
return
$this->
getModule
() .
Repository::FILE_ID_SEPARATOR
. $this->
getFileName
();
87
}
88
return
$this->
getFileName
();
89
}
90
94
public
function
getFilePath
()
95
{
96
if
($this->
getModule
()) {
97
return
$this->
getModule
() .
'/'
. $this->
getFileName
();
98
}
99
return
$this->
getFileName
();
100
}
101
105
public
function
getSourcePath
()
106
{
107
return
$this->sourcePath;
108
}
109
113
public
function
getModule
()
114
{
115
return
$this->module
;
116
}
117
121
public
function
getArea
()
122
{
123
return
$this->area
;
124
}
125
129
public
function
getTheme
()
130
{
131
return
$this->theme
;
132
}
133
137
public
function
getLocale
()
138
{
139
return
$this->locale
;
140
}
141
145
public
function
getExtension
()
146
{
147
if
(!$this->extension) {
148
$this->extension = strtolower(pathinfo($this->
getFileName
(), PATHINFO_EXTENSION));
149
}
150
return
$this->extension;
151
}
152
}
Magento\Framework\View\Asset\getTheme
getTheme()
Definition:
Asset.php:129
Magento\Framework\View\Asset\getModule
getModule()
Definition:
Asset.php:113
Magento\Framework\View\Asset\getFileId
getFileId()
Definition:
Asset.php:83
Magento\Framework\View\Asset\getExtension
getExtension()
Definition:
Asset.php:145
Magento\Framework\View\Asset\getLocale
getLocale()
Definition:
Asset.php:137
Magento\Framework\View\Asset\$locale
$locale
Definition:
Asset.php:40
Magento\Framework\View\Asset\__construct
__construct( $fileName, $sourcePath=null, $area=null, $theme=null, $locale=null, $module=null)
Definition:
Asset.php:56
Magento\Framework\View\Asset\getFilePath
getFilePath()
Definition:
Asset.php:94
Magento\Framework\View\Asset\Repository
Definition:
Repository.php:21
Magento\Framework\View\Asset\$module
$module
Definition:
Asset.php:25
Magento\Framework\View\Asset
Definition:
Asset.php:10
Magento\Framework\View\Asset\Repository\FILE_ID_SEPARATOR
const FILE_ID_SEPARATOR
Definition:
Repository.php:26
Magento\Framework\View\Asset\$theme
$theme
Definition:
Asset.php:35
Magento\Framework\View\Asset\getArea
getArea()
Definition:
Asset.php:121
Magento\Framework\View\Asset\$area
$area
Definition:
Asset.php:30
Magento\Framework\View\Asset\getFileName
getFileName()
Definition:
Asset.php:75
Magento\Framework\View\Asset\getSourcePath
getSourcePath()
Definition:
Asset.php:105
Magento\Framework\View