Piwik\Plugins\CorePluginsAdmin\Controller::uninstall PHP Метод

uninstall() публичный Метод

public uninstall ( $redirectAfter = true )
    public function uninstall($redirectAfter = true)
    {
        $pluginName = $this->initPluginModification(static::UNINSTALL_NONCE);
        $this->dieIfPluginsAdminIsDisabled();
        $uninstalled = $this->pluginManager->uninstallPlugin($pluginName);
        if (!$uninstalled) {
            $path = Filesystem::getPathToPiwikRoot() . '/plugins/' . $pluginName . '/';
            $messagePermissions = Filechecks::getErrorMessageMissingPermissions($path);
            $messageIntro = $this->translator->translate("Warning: \"%s\" could not be uninstalled. Piwik did not have enough permission to delete the files in {$path}. ", $pluginName);
            $exitMessage = $messageIntro . "<br/><br/>" . $messagePermissions;
            $exitMessage .= "<br> Or manually delete this directory (using FTP or SSH access)";
            $ex = new MissingFilePermissionException($exitMessage);
            $ex->setIsHtmlMessage();
            throw $ex;
        }
        $this->redirectAfterModification($redirectAfter);
    }