RainLab\Builder\Classes\MigrationModel::deleteVersion PHP 메소드

deleteVersion() 보호된 메소드

protected deleteVersion ( )
    protected function deleteVersion()
    {
        $versionInformation = $this->getPluginVersionInformation();
        if (!$versionInformation) {
            $versionInformation = [];
        }
        if (array_key_exists($this->version, $versionInformation)) {
            unset($versionInformation[$this->version]);
        }
        $versionFilePath = $this->getPluginUpdatesPath('version.yaml');
        $yamlData = Yaml::render($versionInformation);
        if (!File::put($versionFilePath, $yamlData)) {
            throw new SystemException(sprintf('Error saving file %s', $versionFilePath));
        }
        @File::chmod($versionFilePath);
    }