mirror of
https://github.com/standardebooks/web.git
synced 2025-07-13 10:02:02 -04:00
List artwork by artist via /artworks/<artist-name>
This commit is contained in:
parent
780be15ed0
commit
cad2f5f730
8 changed files with 63 additions and 12 deletions
|
@ -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>
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue