mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-16 13:24:31 +02:00
Use enum for undo mode
This commit is contained in:
parent
218b0adb8f
commit
8a20584e27
14 changed files with 140 additions and 180 deletions
|
@ -42,6 +42,7 @@ declare(strict_types=1);
|
|||
namespace App\Entity\Contracts;
|
||||
|
||||
use App\Entity\LogSystem\AbstractLogEntry;
|
||||
use App\Services\LogSystem\EventUndoMode;
|
||||
|
||||
interface LogWithEventUndoInterface
|
||||
{
|
||||
|
@ -60,12 +61,12 @@ interface LogWithEventUndoInterface
|
|||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUndoneEvent(AbstractLogEntry $event, string $mode = 'undo'): self;
|
||||
public function setUndoneEvent(AbstractLogEntry $event, EventUndoMode $mode = EventUndoMode::UNDO): self;
|
||||
|
||||
/**
|
||||
* Returns the mode how the event was undone:
|
||||
* "undo" = Only a single event was applied to element
|
||||
* "revert" = Element was reverted to the state it was to the timestamp of the log.
|
||||
*/
|
||||
public function getUndoMode(): string;
|
||||
public function getUndoMode(): EventUndoMode;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue