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-signifyd
Block
Adminhtml
System
Config
Field
WebhookUrl.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Signifyd\Block\Adminhtml\System\Config\Field
;
7
8
use
Magento\Framework\Data\Form\Element\AbstractElement
;
9
use
Magento\Config\Block\System\Config\Form\Field
;
10
use
Magento\Store\Model\ScopeInterface
;
11
use
Magento\Store\Model\Store
;
12
16
class
WebhookUrl
extends
Field
17
{
21
protected
function
_getElementHtml
(
AbstractElement
$element
)
22
{
23
$url
=
''
;
24
$originalData =
$element
->getOriginalData();
25
if
(!empty($originalData[
'handler_url'
])) {
26
$url
= $this->getStoreUrl();
27
$url
.= $originalData[
'handler_url'
];
28
}
29
30
return
'<p class="webhook-url">'
. $this->
escapeHtml
(
$url
) .
'</p>'
;
31
}
32
36
protected
function
_isInheritCheckboxRequired
(
AbstractElement
$element
)
37
{
38
return
false
;
39
}
40
46
private
function
getStoreUrl()
47
{
48
$website
= $this->_storeManager->getWebsite($this->
getRequest
()->getParam(
'website'
));
49
50
$isSecure = $this->_scopeConfig->isSetFlag(
51
Store::XML_PATH_SECURE_IN_FRONTEND
,
52
ScopeInterface::SCOPE_WEBSITE
,
53
$website
->getCode()
54
);
55
56
$configPath = $isSecure ?
Store::XML_PATH_SECURE_BASE_LINK_URL
:
Store::XML_PATH_UNSECURE_BASE_LINK_URL
;
57
58
return
$this->_scopeConfig->getValue($configPath,
ScopeInterface::SCOPE_WEBSITE
,
$website
->getCode());
59
}
60
}
$url
$url
Definition:
query_redirect.php:14
Magento\Config\Block\System\Config\Form\Field
Definition:
Field.php:17
$website
$website
Definition:
payment_configuration_rollback.php:38
Magento\Config\Block\System\Config\Form\Field
Definition:
Datetime.php:6
Magento\Signifyd\Block\Adminhtml\System\Config\Field
Definition:
WebhookUrl.php:6
Magento\Framework\View\Element\AbstractBlock\escapeHtml
escapeHtml($data, $allowedTags=null)
Definition:
AbstractBlock.php:890
Magento\Store\Model\Store\XML_PATH_SECURE_BASE_LINK_URL
const XML_PATH_SECURE_BASE_LINK_URL
Definition:
Store.php:78
Magento\Store\Model\ScopeInterface
Definition:
ScopeInterface.php:12
Magento\Signifyd\Block\Adminhtml\System\Config\Field\WebhookUrl\_getElementHtml
_getElementHtml(AbstractElement $element)
Definition:
WebhookUrl.php:21
Magento\Signifyd\Block\Adminhtml\System\Config\Field\WebhookUrl
Definition:
WebhookUrl.php:16
Magento\Store\Model\Store\XML_PATH_UNSECURE_BASE_LINK_URL
const XML_PATH_UNSECURE_BASE_LINK_URL
Definition:
Store.php:80
Magento\Signifyd\Block\Adminhtml\System\Config\Field\WebhookUrl\_isInheritCheckboxRequired
_isInheritCheckboxRequired(AbstractElement $element)
Definition:
WebhookUrl.php:36
Magento\Store\Model\Store\XML_PATH_SECURE_IN_FRONTEND
const XML_PATH_SECURE_IN_FRONTEND
Definition:
Store.php:70
Magento\Store\Model\Store
Definition:
Store.php:38
Magento\Framework\Data\Form\Element\AbstractElement
Definition:
AbstractElement.php:21
Magento\Framework\View\Element\AbstractBlock\getRequest
getRequest()
Definition:
AbstractBlock.php:227
Magento\Store\Model\ScopeInterface\SCOPE_WEBSITE
const SCOPE_WEBSITE
Definition:
ScopeInterface.php:23
$element
$element
Definition:
element.phtml:12