Pimcore\Update::cleanup PHP Method

cleanup() public static method

public static cleanup ( )
    public static function cleanup()
    {
        // remove database tmp table
        $db = Db::get();
        $db->query("DROP TABLE IF EXISTS `" . self::$tmpTable . "`");
        //delete tmp data
        recursiveDelete(PIMCORE_SYSTEM_TEMP_DIRECTORY . "/update", true);
    }

Usage Example

Example #1
0
 public function jobProceduralAction()
 {
     $status = array("success" => true);
     if ($this->getParam("type") == "files") {
         Update::installData($this->getParam("revision"));
     } else {
         if ($this->getParam("type") == "clearcache") {
             \Pimcore\Cache::clearAll();
         } else {
             if ($this->getParam("type") == "preupdate") {
                 $status = Update::executeScript($this->getParam("revision"), "preupdate");
             } else {
                 if ($this->getParam("type") == "postupdate") {
                     $status = Update::executeScript($this->getParam("revision"), "postupdate");
                 } else {
                     if ($this->getParam("type") == "cleanup") {
                         Update::cleanup();
                     }
                 }
             }
         }
     }
     // we use pure PHP here, otherwise this can cause issues with dependencies that changed during the update
     header("Content-type: application/json");
     echo json_encode($status);
     exit;
 }
All Usage Examples Of Pimcore\Update::cleanup