Models/ModelOperator.php
public function saveModelStructure($modelName) {
        $info      = $this->getStructurePathForModel($modelName);
        $filePath  = $info['path'] . '/' . $info['fileName'] . '.yml';
        $modelName = ucfirst($modelName);
        FSService::makeWritable($info['path']);
        if (is_file($filePath)) {
            unlink($filePath);
        }

        $structure = self::fixYamlStructures($this->_structures[$modelName], true);
        file_put_contents($filePath, Yaml::dump($structure, 6, 2));
        $this->_structures[$modelName] = $structure;
        return true;
    }
public function saveModelStructure($modelName) {
        $info      = $this->getStructurePathForModel($modelName);
        $filePath  = $info['path'] . '/' . $info['fileName'] . '.yml';
        $modelName = ucfirst($modelName);
        FSService::makeWritable($info['path']);
        if (is_file($filePath)) {
            unlink($filePath);
        }

        $structure = self::fixYamlStructures($this->_structures[$modelName], true);
        file_put_contents($filePath, Yaml::dump($structure, 6, 2));
        $this->_structures[$modelName] = $structure;
        return true;
    }
Save structure to relative YML file

@param string $modelName
@return bool