|
Apache/2.4.41 (Ubuntu) Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) server ip : 62.171.164.128 | your ip : 127.0.0.1 safemode OFF > / home / dev2.destoffenstraat.com / app / code / WeSupply / Toolbox / Model / |
Filename | /home/dev2.destoffenstraat.com/app/code/WeSupply/Toolbox/Model/WsDomainComment.php |
Size | 2.26 kb |
Permission | rwxrwxrwx |
Owner | root : root |
Create time | 17-Aug-2025 10:26 |
Last modified | 17-May-2021 07:15 |
Last accessed | 22-Aug-2025 09:20 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace WeSupply\Toolbox\Model;
use Magento\Framework\Phrase;
use Magento\Config\Model\Config\CommentInterface;
use WeSupply\Toolbox\Helper\Data as Helper;
/**
* Class WsDomainComment
* @package WeSupply\Toolbox\Model
*/
class WsDomainComment implements CommentInterface
{
/**
* @var Helper
*/
protected $helper;
/**
* WsDomainComment constructor.
* @param Helper $helper
*/
public function __construct(
Helper $helper
)
{
$this->helper = $helper;
}
/**
* @param string $elementValue
* @return Phrase|string
*/
public function getCommentText($elementValue)
{
$commentEl = '';
$weSupplyDomain = $this->helper->getWeSupplyDomain();
$weSupplyDomainDefault = $this->helper->getWesupplyDomainDefault();
$weSupplySubdomain = $this->helper->getClientNameByScope();
if ($weSupplySubdomain != 'install') {
if ($this->helper->weSupplyHasDomainAlias()) {
$commentEl .= '<span id="wesupply_api_integration_wesupply_subdomain">' . $weSupplyDomain . '</span>';
} else {
$commentEl .= '<span id="wesupply_api_integration_wesupply_subdomain">' . $weSupplySubdomain . '.' . $weSupplyDomainDefault . '</span>';
}
} else {
$commentEl .= '<span id="wesupply_api_integration_wesupply_subdomain">' . __('Will be displayed after a WeSupply account is connected with this Magento store.') . '</span>';
}
$commentEl .= '<span class="comment">';
$commentEl .= __('The WeSupply URL has two parts:');
$commentEl .= '<br> - ' . __('a subdomain name you chose when you set up your account, followed by ') . '<strong>' . $weSupplyDomainDefault . '</strong>';
$commentEl .= '<br> - ' . __('or your <strong>Domain Alias</strong> if you already have setup one in your WeSupply account under Settings -> General -> Custom Domain.');
$commentEl .= '<br>' . '(' . __('Examples: ') . '<strong>' . 'mycompany.' . $weSupplyDomainDefault . '</strong> or <strong>yourdomainalias.com</strong>).';
$commentEl .= '</span>';
return $commentEl;
}
}
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace WeSupply\Toolbox\Model;
use Magento\Framework\Phrase;
use Magento\Config\Model\Config\CommentInterface;
use WeSupply\Toolbox\Helper\Data as Helper;
/**
* Class WsDomainComment
* @package WeSupply\Toolbox\Model
*/
class WsDomainComment implements CommentInterface
{
/**
* @var Helper
*/
protected $helper;
/**
* WsDomainComment constructor.
* @param Helper $helper
*/
public function __construct(
Helper $helper
)
{
$this->helper = $helper;
}
/**
* @param string $elementValue
* @return Phrase|string
*/
public function getCommentText($elementValue)
{
$commentEl = '';
$weSupplyDomain = $this->helper->getWeSupplyDomain();
$weSupplyDomainDefault = $this->helper->getWesupplyDomainDefault();
$weSupplySubdomain = $this->helper->getClientNameByScope();
if ($weSupplySubdomain != 'install') {
if ($this->helper->weSupplyHasDomainAlias()) {
$commentEl .= '<span id="wesupply_api_integration_wesupply_subdomain">' . $weSupplyDomain . '</span>';
} else {
$commentEl .= '<span id="wesupply_api_integration_wesupply_subdomain">' . $weSupplySubdomain . '.' . $weSupplyDomainDefault . '</span>';
}
} else {
$commentEl .= '<span id="wesupply_api_integration_wesupply_subdomain">' . __('Will be displayed after a WeSupply account is connected with this Magento store.') . '</span>';
}
$commentEl .= '<span class="comment">';
$commentEl .= __('The WeSupply URL has two parts:');
$commentEl .= '<br> - ' . __('a subdomain name you chose when you set up your account, followed by ') . '<strong>' . $weSupplyDomainDefault . '</strong>';
$commentEl .= '<br> - ' . __('or your <strong>Domain Alias</strong> if you already have setup one in your WeSupply account under Settings -> General -> Custom Domain.');
$commentEl .= '<br>' . '(' . __('Examples: ') . '<strong>' . 'mycompany.' . $weSupplyDomainDefault . '</strong> or <strong>yourdomainalias.com</strong>).';
$commentEl .= '</span>';
return $commentEl;
}
}