updatePlugin() public method

플러그인을 업데이트한다. 내부적으로는 단순히 플러그인을 다시 activate 시킨다.
public updatePlugin ( string $pluginId, boolean $updateStatus = true ) : void
$pluginId string 업데이트할 플러그인의 아이디
$updateStatus boolean true일 경우, 업데이트한 플러그인의 상태를 status에 업데이트한다.
return void
コード例 #1
0
 public function postUpdatePlugin($pluginId, PluginHandler $handler)
 {
     try {
         $handler->updatePlugin($pluginId);
     } catch (XpressengineException $e) {
         throw new HttpException(Response::HTTP_FORBIDDEN, $e->getMessage(), $e);
     } catch (\Exception $e) {
         throw $e;
     }
     app('session.store')->flash('alert', ['type' => 'success', 'message' => '플러그인을 업데이트했습니다.']);
     return XePresenter::makeApi(['type' => 'success', 'message' => '플러그인을 업데이트했습니다.']);
 }
コード例 #2
0
 /**
  * activatePlugin
  *
  * @param $pluginId
  *
  * @return void
  */
 protected function updatePlugin($pluginId)
 {
     $this->handler->getAllPlugins(true);
     $this->handler->updatePlugin($pluginId);
 }