Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
WebhookUrl.php
Go to the documentation of this file.
1 <?php
7 
12 
16 class WebhookUrl extends Field
17 {
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 
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(
53  $website->getCode()
54  );
55 
57 
58  return $this->_scopeConfig->getValue($configPath, ScopeInterface::SCOPE_WEBSITE, $website->getCode());
59  }
60 }
const XML_PATH_SECURE_BASE_LINK_URL
Definition: Store.php:78
const XML_PATH_UNSECURE_BASE_LINK_URL
Definition: Store.php:80
const XML_PATH_SECURE_IN_FRONTEND
Definition: Store.php:70
$element
Definition: element.phtml:12