本文整理汇总了PHP中XLite::getXCNLicense方法的典型用法代码示例。如果您正苦于以下问题:PHP XLite::getXCNLicense方法的具体用法?PHP XLite::getXCNLicense怎么用?PHP XLite::getXCNLicense使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XLite
的用法示例。
在下文中一共展示了XLite::getXCNLicense方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getEditionName
/**
* Alias
*
* @return string
*/
protected function getEditionName()
{
$result = 'Trial';
$license = \XLite::getXCNLicense();
if ($license && ($keyData = $license->getKeyData()) && !empty($keyData['editionName'])) {
if (!is_array($keyData)) {
$keyData = unserialize($keyData);
}
if (isset($keyData['editionName'])) {
$result = $keyData['editionName'];
}
}
return $result;
}
示例2: isValidXCNLicense
/**
* Return true if XCN license exists and is valid
*
* @return boolean
*/
protected function isValidXCNLicense()
{
$result = false;
$license = \XLite::getXCNLicense();
if ($license) {
$keyData = $license->getKeyData();
$result = empty($keyData['message']);
}
return $result;
}
示例3: isRequestForUpgradeAvailable
/**
* Check for request for upgrade availability
*
* @return boolean
*/
protected function isRequestForUpgradeAvailable()
{
$result = false;
if (\XLite\Upgrade\Cell::getInstance()->hasCoreUpdate() && \XLite::getXCNLicense()) {
foreach ($this->getIncompatibleEntries() as $module) {
if (!$module->isCustom()) {
$result = true;
break;
}
}
}
return $result;
}
示例4: checkACL
/**
* Check ACL permissions
*
* @return boolean
*/
public function checkACL()
{
return parent::checkACL() && !(bool) \XLite::getXCNLicense();
}
示例5: hasLicense
/**
* Check if the store has any license
*
* @return boolean
*/
protected function hasLicense()
{
return (bool) \XLite::getXCNLicense();
}
示例6: showXCNModuleNotice
/**
* Check if the XC module notice must be displayed.
* The notice is displayed when the module is a part of X-Cart 5 license
* and current X-Cart 5 license type of core differs from X-Cart 5 license type of module.
*
* @param \XLite\Model\Module $module Module entity
*
* @return boolean
*/
protected function showXCNModuleNotice(\XLite\Model\Module $module)
{
$marketplaceModule = \XLite\Core\Database::getRepo('XLite\\Model\\Module')->findOneBy(array('name' => $module->getName(), 'author' => $module->getAuthor(), 'fromMarketplace' => true));
return $marketplaceModule && (bool) \XLite::getXCNLicense() && $this->isXCN($marketplaceModule) && !$module->getEnabled() && 1 < $marketplaceModule->getEditionState();
}
示例7: getLicenseMessage
/**
* License info
*
* @return string
*/
protected function getLicenseMessage()
{
$key = \XLite::getXCNLicense();
if ($key) {
$keyData = $key->getKeyData();
}
return $key ? 'License: ' . $keyData['editionName'] : static::t('License: trial version');
}
示例8: isVisible
/**
* Button is visible only if license was not activated
*
* @return boolean
*/
protected function isVisible()
{
return parent::isVisible() && !\XLite::getXCNLicense();
}
示例9: isNoticeActive
/**
* Check if notice should be displayed in the header
*
* @return boolean
*/
protected function isNoticeActive()
{
return !\XLite::getXCNLicense();
}