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-page-cache
Block
Javascript.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\PageCache\Block
;
7
14
class
Javascript
extends
\Magento\Framework\View\Element\Template
15
{
21
public
function
getScriptOptions
()
22
{
23
$params
= [
24
'url'
=> $this->
getUrl
(
25
'page_cache/block/render/'
,
26
[
27
'_current'
=>
true
,
28
'_secure'
=> $this->templateContext->getRequest()->isSecure()
29
]
30
),
31
'handles'
=> $this->_layout->getUpdate()->getHandles(),
32
'originalRequest'
=> [
33
'route'
=> $this->
getRequest
()->getRouteName(),
34
'controller'
=> $this->
getRequest
()->getControllerName(),
35
'action'
=> $this->
getRequest
()->getActionName(),
36
'uri'
=> $this->
getRequest
()->getRequestUri(),
37
],
38
'versionCookieName'
=>
\Magento\Framework\App\PageCache\Version::COOKIE_NAME
39
];
40
return
json_encode(
$params
);
41
}
42
}
Magento\Framework\App\PageCache\Version\COOKIE_NAME
const COOKIE_NAME
Definition:
Version.php:17
Magento\PageCache\Block\Javascript\getScriptOptions
getScriptOptions()
Definition:
Javascript.php:21
Magento\PageCache\Block\Javascript
Definition:
Javascript.php:14
Magento\Framework\View\Element\AbstractBlock\getUrl
getUrl($route='', $params=[])
Definition:
AbstractBlock.php:773
Magento\Framework\View\Element\Template
Definition:
Template.php:32
$params
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition:
website.php:18
Magento\PageCache\Block
Definition:
JavascriptTest.php:7
Magento\Framework\View\Element\AbstractBlock\getRequest
getRequest()
Definition:
AbstractBlock.php:227