Skip to content

Commit

Permalink
Use ContentStorageHandler instance instead of ContentStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed May 22, 2024
1 parent f9f77ac commit 51fc2c2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Cms/ModelWithContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Closure;
use Kirby\Content\Content;
use Kirby\Content\ContentStorage;
use Kirby\Content\ContentStorageHandler;
use Kirby\Content\ContentTranslation;
use Kirby\Content\PlainTextContentStorageHandler;
use Kirby\Content\Version;
Expand Down Expand Up @@ -48,7 +48,7 @@ abstract class ModelWithContent implements Identifiable, Stringable
public Content|null $content;
public static App $kirby;
protected Site|null $site;
protected ContentStorage $storage;
protected ContentStorageHandler $storage;
public Collection|null $translations = null;

/**
Expand Down Expand Up @@ -566,11 +566,10 @@ public function site(): Site
* Returns the content storage handler
* @internal
*/
public function storage(): ContentStorage
public function storage(): ContentStorageHandler
{
return $this->storage ??= new ContentStorage(
model: $this,
handler: PlainTextContentStorageHandler::class
return $this->storage ??= new PlainTextContentStorageHandler(
model: $this,
);
}

Expand Down

0 comments on commit 51fc2c2

Please sign in to comment.