本文整理汇总了PHP中Piwik\Plugin\Manager::uninstallPlugin方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::uninstallPlugin方法的具体用法?PHP Manager::uninstallPlugin怎么用?PHP Manager::uninstallPlugin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Plugin\Manager
的用法示例。
在下文中一共展示了Manager::uninstallPlugin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: uninstall
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);
}