sClassName = get_class($oObject); $this->sClassLabel = MetaModel::GetName($this->GetClassName()); // Note: We get the raw name as only the front-end consumer knows when and how to encode it. $this->sName = $oObject->GetRawName(); $this->sIconUrl = $oObject->GetIcon(false); if(MetaModel::HasStateAttributeCode($this->sClassName)) { $this->sStatusCode = $oObject->GetState(); $this->sStatusLabel = $oObject->GetStateLabel(); $this->sStatusColor = UIHelper::GetColorFromStatus($this->sClassName, $this->sStatusCode); } parent::__construct('', [], static::DEFAULT_COLOR, $sId); } /** * @return string */ public function GetClassName(): string { return $this->sClassName; } /** * @return string */ public function GetObjectName(): string { return $this->sName; } public function SetStatus($sCode, $sLabel, $sColor) { $this->sStatusCode = $sColor; $this->sStatusLabel = $sLabel; $this->sStatusColor = $sColor; return $this; } public function GetStatusCode(): string { return $this->sStatusCode; } public function GetStatusLabel(): string { return $this->sStatusLabel; } public function GetStatusColor(): string { return $this->sStatusColor; } }