N°2844 N°3570 Bring back Synchronized, Obsolete and Archived tags next to object name

This commit is contained in:
Stephen Abello
2021-03-02 15:55:50 +01:00
parent 52113233b8
commit abcf73f233
5 changed files with 78 additions and 26 deletions

View File

@@ -19,6 +19,7 @@ class TitleForObjectDetails extends Title
protected $sStatusCode;
protected $sStatusLabel;
protected $sStatusColor;
protected $aTags;
public function __construct(string $sClassName, string $sObjectName, ?string $sId = null)
{
@@ -28,6 +29,7 @@ class TitleForObjectDetails extends Title
$this->sStatusCode = null;
$this->sStatusLabel = null;
$this->sStatusColor = null;
$this->aTags = [];
}
/**
@@ -69,4 +71,26 @@ class TitleForObjectDetails extends Title
{
return $this->sStatusColor;
}
/**
* @return array
*/
public function GetTags(): array
{
return $this->aTags;
}
/**
* @param array $aTags
*
* @return $this
*/
public function SetTags(array $aTags)
{
$this->aTags = $aTags;
return $this;
}
}

View File

@@ -34,7 +34,7 @@ class TitleUIBlockFactory extends AbstractUIBlockFactory
return $oTitle;
}
public static function MakeForObjectDetails(DBObject $oObject, ?string $sId = null)
public static function MakeForObjectDetails(DBObject $oObject, array $aIcons = [], ?string $sId = null)
{
// TODO 3.0.0: Refactor all of this
$sObjClass = get_class($oObject);
@@ -77,6 +77,7 @@ class TitleUIBlockFactory extends AbstractUIBlockFactory
$oTitle->SetStatus($sStatusAttCode, $sStatusLabel, $sStatusColor);
}
}
$oTitle->SetTags($aIcons);
return $oTitle;
}