Add submitter info to admin view of artworks

This commit is contained in:
Alex Cabal 2024-01-07 14:23:34 -06:00
parent 017baef7d3
commit 52033320e1
3 changed files with 21 additions and 7 deletions

View file

@ -20,6 +20,7 @@ use function Safe\sprintf;
* @property string $Dimensions
* @property Ebook $Ebook
* @property Museum $Museum
* @property User $Submitter
* @property ?ImageMimeType $MimeType
*/
class Artwork extends PropertiesBase{
@ -52,6 +53,7 @@ class Artwork extends PropertiesBase{
protected $_Dimensions = null;
protected $_Ebook = null;
protected $_Museum = null;
protected $_Submitter = null;
protected ?ImageMimeType $_MimeType = null;
// *******
@ -70,6 +72,14 @@ class Artwork extends PropertiesBase{
return $this->_UrlName;
}
protected function GetSubmitter(): User{
if($this->_Submitter === null){
$this->_Submitter = User::Get($this->SubmitterUserId);
}
return $this->_Submitter;
}
protected function GetUrl(): string{
if($this->_Url === null){
$this->_Url = '/artworks/' . $this->Artist->UrlName . '/' . $this->UrlName;