start add support for phone status + improve edit of phone for hidden phones

This commit is contained in:
osaajani 2023-02-18 16:39:07 +01:00
parent f9e64aee65
commit 38d350dfc2
19 changed files with 357 additions and 6 deletions

View file

@ -236,6 +236,19 @@ namespace controllers\internals;
return true;
}
/**
* Update a phone status.
*
* @param int $id : Phone id
* @param string $status : The new status of the phone
*
* @return bool : false on error, true on success
*/
public function update_status(int $id, string $status) : bool
{
return (bool) $this->get_model()->update($id, ['status' => $status]);
}
/**
* Get the model for the Controller.
*/