예제 #1
0
 /**
  * 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
0
 /**
  * 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
0
 /**
  * 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
0
 /**
  * Check ACL permissions
  *
  * @return boolean
  */
 public function checkACL()
 {
     return parent::checkACL() && !(bool) \XLite::getXCNLicense();
 }
예제 #5
0
파일: AView.php 프로젝트: kirkbauer2/kirkxc
 /**
  * Check if the store has any license
  *
  * @return boolean
  */
 protected function hasLicense()
 {
     return (bool) \XLite::getXCNLicense();
 }
예제 #6
0
 /**
  * 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
0
 /**
  * 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
0
 /**
  * Button is visible only if license was not activated
  *
  * @return boolean
  */
 protected function isVisible()
 {
     return parent::isVisible() && !\XLite::getXCNLicense();
 }
예제 #9
0
 /**
  * Check if notice should be displayed in the header
  *
  * @return boolean
  */
 protected function isNoticeActive()
 {
     return !\XLite::getXCNLicense();
 }