protected function installPluginByHandle($handle) { Craft::log(Craft::t('Installing plugin {handle}', ['handle' => $handle])); try { $this->getPluginService()->installPlugin($handle); } catch (\Exception $e) { $this->addError($e->getMessage()); } }