Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | protected function execute() |
||
16 | { |
||
17 | $entityId = $this->mapper->getEntityPk($this->entity); |
||
18 | if (! $entityId) { |
||
19 | return; |
||
20 | } |
||
21 | |||
22 | $this->now = time(); |
||
23 | |||
24 | $update = new \Sirius\Sql\Update($this->mapper->getWriteConnection()); |
||
25 | $update->table($this->mapper->getTable()) |
||
26 | ->columns([ |
||
27 | $this->getOption('deleted_at_column') => $this->now |
||
28 | ]) |
||
29 | ->where('id', $entityId); |
||
30 | $update->perform(); |
||
31 | } |
||
41 |