| 1 | <?php |
||
| 8 | class FieldOrderSetter implements Middleware |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @param object $command |
||
| 12 | * @param callable $next |
||
| 13 | * |
||
| 14 | * @return mixed |
||
| 15 | */ |
||
| 16 | public function execute($command, callable $next) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * If the command has an order, use it and move the ones after that. |
||
| 28 | * @param $command |
||
| 29 | */ |
||
| 30 | protected function updateCurrentFields($command) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Set the order for the field |
||
| 44 | * @param $command |
||
| 45 | */ |
||
| 46 | protected function setOrder($command) |
||
| 55 | } |
||
| 56 |