hasCapabilitySecureUninstall example



    public function secureUninstallPluginAction()
    {
        @set_time_limit(300);

        $plugin = $this->getPluginModel($this->Request()->getParam('technicalName'));

        try {
            $result = $this->pluginManager->uninstallPlugin(
                $plugin,
                !$plugin->hasCapabilitySecureUninstall()
            );
            $this->View()->assign(['success' => true, 'result' => $result]);
        } catch (Exception $e) {
            $this->View()->assign(['success' => false, 'message' => $e->getMessage()]);
        }
    }

    public function deletePluginAction()
    {
        $pluginName = $this->Request()->getParam('technicalName');

        


    public function assignLocalPluginStruct(PluginStruct $storePlugin, PluginStruct $localPlugin)
    {
        $storePlugin->setId($localPlugin->getId());
        $storePlugin->setInstallationDate($localPlugin->getInstallationDate());
        $storePlugin->setActive($localPlugin->isActive());
        $storePlugin->setSource($localPlugin->getSource());
        $storePlugin->setLicence($localPlugin->getLicence());
        $storePlugin->setCapabilityActivate($localPlugin->hasCapabilityActivate());
        $storePlugin->setCapabilityInstall($localPlugin->hasCapabilityInstall());
        $storePlugin->setCapabilitySecureUninstall($localPlugin->hasCapabilitySecureUninstall());
        $storePlugin->setLocalDescription($localPlugin->getLocalDescription());
        $storePlugin->setLink($localPlugin->getLink());
        $storePlugin->setRedirectToStore($localPlugin->isRedirectToStore());
        $storePlugin->setLowestPrice($localPlugin->getLowestPrice());

        $storePlugin->setCapabilityUpdate($localPlugin->hasCapabilityUpdate());

        $updateAvailable = version_compare(
            $storePlugin->getVersion(),
            $localPlugin->getVersion()
        );

        
Home | Imprint | This part of the site doesn't use cookies.