This commit is contained in:
Anne-Cath
2025-09-08 15:12:21 +02:00
parent ab4993debe
commit dd2f6e7413
29 changed files with 261 additions and 275 deletions

View File

@@ -0,0 +1,47 @@
<?php
class CellStatus_Issue extends CellStatus_Modify
{
protected $m_sReason;
public function __construct($proposedValue, $previousValue, $sReason)
{
$this->m_sReason = $sReason;
parent::__construct($proposedValue, $previousValue);
}
public function GetCLIValue(bool $bLocalizedValues = false): string
{
if (is_null($this->m_proposedValue)) {
return Dict::Format('UI:CSVReport-Value-SetIssue');
}
return Dict::Format('UI:CSVReport-Value-ChangeIssue', $this->m_proposedValue);
}
public function GetHTMLValue(bool $bLocalizedValues = false): string
{
if (is_null($this->m_proposedValue)) {
return Dict::Format('UI:CSVReport-Value-SetIssue');
}
if ($this->m_proposedValue instanceof ReportValue) {
return Dict::Format('UI:CSVReport-Value-ChangeIssue', $this->m_proposedValue->GetAsHTML($bLocalizedValues));
}
return Dict::Format('UI:CSVReport-Value-ChangeIssue', utils::EscapeHtml($this->m_proposedValue));
}
public function GetDescription()
{
return $this->m_sReason;
}
/*
* @since 3.2.0
*/
public function GetCLIValueAndDescription(): string
{
return sprintf("%s. %s",
$this->GetCLIValue(),
$this->GetDescription()
);
}
}