Use enum for undo mode

This commit is contained in:
Jan Böhmer 2023-06-18 21:26:28 +02:00
parent 218b0adb8f
commit 8a20584e27
14 changed files with 140 additions and 180 deletions

View file

@ -127,9 +127,9 @@ class LogEntryExtraFormatter
}
if (($context instanceof LogWithEventUndoInterface) && $context->isUndoEvent()) {
if ('undo' === $context->getUndoMode()) {
if (EventUndoMode::UNDO === $context->getUndoMode()) {
$array['log.undo_mode.undo'] = '#' . $context->getUndoEventID();
} elseif ('revert' === $context->getUndoMode()) {
} elseif (EventUndoMode::REVERT === $context->getUndoMode()) {
$array['log.undo_mode.revert'] = '#' . $context->getUndoEventID();
}
}