mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 03:16:36 -04:00
Add submitter info to admin view of artworks
This commit is contained in:
parent
017baef7d3
commit
52033320e1
3 changed files with 21 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue