Skip to content

Commit

Permalink
Add ::touchLanguage from ContentStorage to ContentStorageHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed May 22, 2024
1 parent 3c7fac5 commit 238b762
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Content/ContentStorageHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,19 @@ abstract public function read(VersionId $versionId, Language $language): array;
*/
abstract public function touch(VersionId $versionId, Language $language): void;

/**
* Touches all versions of a language
* @internal
*/
public function touchLanguage(Language $language): void
{
foreach ($this->dynamicVersions() as $version) {
if ($this->exists($version, $language) === true) {
$this->touch($version, $language);
}
}
}

/**
* Updates the content fields of an existing version
*
Expand Down

0 comments on commit 238b762

Please sign in to comment.