From 6b58bf53e312a67119289b894c5b482d057e5665 Mon Sep 17 00:00:00 2001 From: winter Date: Sun, 26 Jan 2025 21:53:26 +0000 Subject: make mentions work properly + ui for them --- Digitigrade/Model.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Digitigrade/Model.php') diff --git a/Digitigrade/Model.php b/Digitigrade/Model.php index 9ce759a..14d025d 100644 --- a/Digitigrade/Model.php +++ b/Digitigrade/Model.php @@ -138,6 +138,13 @@ abstract class Model { protected function hydrate() { } + /** + * Saves fields of the model that couldn't be saved automatically + * @return void + */ + protected function dehydrate() { + } + /** * Checks that all fields of the model are valid and allowed * @return bool true if the model is valid, false otherwise @@ -308,6 +315,9 @@ abstract class Model { } } + // anything else that needs saving right now + $this->dehydrate(); + $this->saved = true; } -- cgit v1.3