This commit is contained in:
Bence Pőcze 2023-05-07 01:17:45 +02:00
parent 45c4206686
commit 5c9b9f140d
Signed by: bence
GPG Key ID: DC5BD6E95A333E6D
2 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,8 @@ abstract class ModelWithSlug extends Model
{
if ($this->slug === null) {
$this->slug = $this->generateSlug();
var_dump('getSlug called');
var_dump($this->slug);
}
return $this->slug;

View File

@ -113,6 +113,9 @@ class PersistentDataManager implements IPersistentDataManager
}
}
var_dump($modified);
var_dump($diff);
if (count($modified) > 0) {
if ($model instanceof ModelWithSlug && isset($modified['slug'])) {
$modified['slug'] = $this->generateUniqueSlug($model, $modified['slug']);