Jarves\Configuration\Bundle::saveFileBased PHP Method

saveFileBased() public method

public saveFileBased ( $property ) : boolean
$property
return boolean
    public function saveFileBased($property)
    {
        $xml = $this->exportFileBased($property);
        $xmlFile = $this->getPropertyFilePath($property);
        $emptyXml = '<config>
  <bundle/>
</config>';
        $fs = $this->getJarves()->getFilesystem();
        if ($xml == $emptyXml) {
            if ($fs->has($xmlFile)) {
                return $fs->delete($xmlFile);
            } else {
                return true;
            }
        } else {
            return $fs->write($xmlFile, $xml);
        }
    }