diff --git a/core/bulkchange/CellStatus_SearchIssue.php b/core/bulkchange/CellStatus_SearchIssue.php new file mode 100644 index 000000000..ef109dd91 --- /dev/null +++ b/core/bulkchange/CellStatus_SearchIssue.php @@ -0,0 +1,91 @@ +sSerializedSearch = $sSerializedSearch; + $this->m_sAllowedValues = $sAllowedValues; + $this->m_sTargetClass = $sClass; + $this->sAllowedValuesSearch = $sAllowedValuesSearch; + } + + public function GetCLIValue(bool $bLocalizedValues = false): string + { + if (null === $this->m_sReason) { + return Dict::Format('UI:CSVReport-Value-NoMatch', ''); + } + + return $this->m_sReason; + } + + public function GetHTMLValue(bool $bLocalizedValues = false): string + { + if (null === $this->m_sReason) { + return Dict::Format('UI:CSVReport-Value-NoMatch', ''); + } + + return utils::EscapeHtml($this->m_sReason); + } + + public function GetDescription() + { + if (\utils::IsNullOrEmptyString($this->m_sAllowedValues) || + \utils::IsNullOrEmptyString($this->m_sTargetClass)) { + return ''; + } + + return Dict::Format('UI:CSVReport-Value-NoMatch-PossibleValues', $this->m_sTargetClass, $this->m_sAllowedValues); + } + + /** + * @return string + * @since 3.1.0 N°5305 + */ + public function GetSearchLinkUrl() + { + return sprintf("UI.php?operation=search&filter=%s", + rawurlencode($this->sSerializedSearch ?? "") + ); + } + + /** + * @return null|string + * @since 3.1.0 N°5305 + */ + public function GetAllowedValuesLinkUrl(): ?string + { + return sprintf("UI.php?operation=search&filter=%s", + rawurlencode($this->sAllowedValuesSearch ?? "") + ); + } +} \ No newline at end of file