List artwork by artist via /artworks/<artist-name>

This commit is contained in:
Mike Colagrosso 2024-01-22 21:24:01 -07:00 committed by Alex Cabal
parent 780be15ed0
commit cad2f5f730
8 changed files with 63 additions and 12 deletions

View file

@ -4,6 +4,7 @@ use function Safe\date;
/**
* @property string $UrlName
* @property string $Url
* @property array<string> $AlternateNames
* @property array<string> $_AlternateNames
*/
@ -14,6 +15,7 @@ class Artist extends PropertiesBase{
public ?datetime $Created = null;
public ?datetime $Updated = null;
protected ?string $_UrlName = null;
protected ?string $_Url = null;
protected $_AlternateNames;
// *******
@ -32,6 +34,14 @@ class Artist extends PropertiesBase{
return $this->_UrlName;
}
protected function GetUrl(): string{
if($this->_Url === null){
$this->_Url = '/artworks/' . $this->UrlName;
}
return $this->_Url;
}
/**
* @return array<string>
*/