/** * * @return Aitoc_Aitsys_Helper_License */ protected function _addReInstallAction() { if ($this->_license->isInstalled()) { $this->_actions[] = array('url' => array('path' => 'aitsys/license/reInstall', 'args' => array('modulekey' => $this->_license->getKey())), 'title' => $this->__('Re-Install')); } return $this; }
public function canUpgrade() { if (!$this->_hasUpgrade) { return false; } $module = $this->getModule(); $currentConstrain = $this->_license->getConstrain(); $constraint = $this->getConstraint(); if (sizeof($currentConstrain) != sizeof($constraint)) { return false; } $canUpgrade = false; foreach ($constraint as $type => $value) { $currentConstrain[$type] = $currentConstrain[$type]['value']; $value = $value['value']; if (!isset($currentConstrain[$type])) { return false; } if (null !== $value) { if ($currentConstrain[$type] > $value) { return false; } else { $canUpgrade = true; } } else { $canUpgrade = true; } } if ($canUpgrade) { return $this->_license->isInstalled(); } return false; }
/** * * @return Aitoc_Aitsys_Helper_License */ protected function _addInstallAction() { if ($this->_license->isUninstalled()) { $this->_actions[] = array('url' => array('path' => 'aitsys/license/manage', 'args' => array('modulekey' => $this->_license->getKey())), 'title' => $this->__('Install')); } elseif ($this->_license->isInstalled()) { $this->_actions[] = array('url' => array('path' => 'aitsys/license/manage', 'args' => array('modulekey' => $this->_license->getKey())), 'title' => $this->__('Manage')); } return $this; }