Upgrade to 3.6.0

This commit is contained in:
Bastian Allgeier
2021-11-16 14:53:37 +01:00
parent 7388fa4d24
commit 92b7a330fa
318 changed files with 20017 additions and 6878 deletions

View File

@@ -2,7 +2,7 @@
namespace Kirby\Cms;
use Kirby\Toolkit\Properties;
use Kirby\Filesystem\IsFile;
/**
* FileVersion
@@ -15,10 +15,7 @@ use Kirby\Toolkit\Properties;
*/
class FileVersion
{
use FileFoundation {
toArray as parentToArray;
}
use Properties;
use IsFile;
protected $modifications;
protected $original;
@@ -47,8 +44,8 @@ class FileVersion
return $this->asset()->$method(...$arguments);
}
// content fields
if (is_a($this->original(), 'Kirby\Cms\File') === true) {
// content fields
return $this->original()->content()->get($method, $arguments);
}
}
@@ -101,7 +98,11 @@ class FileVersion
*/
public function save()
{
$this->kirby()->thumb($this->original()->root(), $this->root(), $this->modifications());
$this->kirby()->thumb(
$this->original()->root(),
$this->root(),
$this->modifications()
);
return $this;
}
@@ -132,7 +133,7 @@ class FileVersion
*/
public function toArray(): array
{
$array = array_merge($this->parentToArray(), [
$array = array_merge($this->asset()->toArray(), [
'modifications' => $this->modifications(),
]);