deactivatePlugin() public method

Deactivate plugin
public deactivatePlugin ( string $pluginName )
$pluginName string Name of plugin
コード例 #1
0
 public function test_deactivatePlugin()
 {
     $this->assertFalse($this->manager->isPluginActivated('ExampleTheme'));
     $this->manager->activatePlugin('ExampleTheme');
     $this->assertTrue($this->manager->isPluginActivated('ExampleTheme'));
     $this->manager->deactivatePlugin('ExampleTheme');
     $this->assertFalse($this->manager->isPluginActivated('ExampleTheme'));
 }
コード例 #2
0
ファイル: Controller.php プロジェクト: piwik/piwik
 public function deactivate($redirectAfter = true)
 {
     $pluginName = $this->initPluginModification(static::DEACTIVATE_NONCE);
     $this->dieIfPluginsAdminIsDisabled();
     $this->pluginManager->deactivatePlugin($pluginName);
     $this->redirectAfterModification($redirectAfter);
 }