Skip to content

Commit 5d678d5

Browse files
authored
Merge pull request #584 from caesar-team/hotfix/CAES-1708
[Item] CAES-1708: Implemented change raws while share item.
2 parents b0aa031 + 0baf21d commit 5d678d5

File tree

6 files changed

+36
-0
lines changed

6 files changed

+36
-0
lines changed

src/Form/Type/Request/Item/BatchMoveItemRequestType.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
2525
->add('secret', TextType::class, [
2626
'required' => false,
2727
])
28+
->add('raws', TextType::class, [
29+
'required' => false,
30+
])
2831
;
2932
}
3033

src/Form/Type/Request/Item/MoveItemRequestType.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
2525
->add('secret', TextType::class, [
2626
'required' => false,
2727
])
28+
->add('raws', TextType::class, [
29+
'required' => false,
30+
])
2831
;
2932
}
3033

src/Request/Item/BatchMoveItemRequest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ final class BatchMoveItemRequest implements MoveItemRequestInterface
1212

1313
private ?string $secret = null;
1414

15+
private ?string $raws = null;
16+
1517
public function getItem(): Item
1618
{
1719
return $this->item;
@@ -31,4 +33,14 @@ public function setSecret(?string $secret): void
3133
{
3234
$this->secret = $secret;
3335
}
36+
37+
public function getRaws(): ?string
38+
{
39+
return $this->raws;
40+
}
41+
42+
public function setRaws(?string $raws): void
43+
{
44+
$this->raws = $raws;
45+
}
3446
}

src/Request/Item/MoveItemRequest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ final class MoveItemRequest implements MoveItemRequestInterface
1919

2020
private ?string $secret;
2121

22+
private ?string $raws;
23+
2224
private User $user;
2325

2426
private Item $item;
@@ -27,6 +29,7 @@ public function __construct(Item $item, User $user)
2729
{
2830
$this->list = null;
2931
$this->secret = null;
32+
$this->raws = null;
3033
$this->user = $user;
3134
$this->item = $item;
3235
}
@@ -51,6 +54,16 @@ public function setSecret(?string $secret): void
5154
$this->secret = $secret;
5255
}
5356

57+
public function getRaws(): ?string
58+
{
59+
return $this->raws;
60+
}
61+
62+
public function setRaws(?string $raws): void
63+
{
64+
$this->raws = $raws;
65+
}
66+
5467
public function getItem(): Item
5568
{
5669
return $this->item;

src/Request/Item/MoveItemRequestInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ interface MoveItemRequestInterface
1111
public function getItem(): Item;
1212

1313
public function getSecret(): ?string;
14+
15+
public function getRaws(): ?string;
1416
}

src/Services/ItemRelocator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public function move(Directory $directory, MoveItemRequestInterface $request): v
2424
if (null !== $request->getSecret()) {
2525
$item->setSecret($request->getSecret());
2626
}
27+
if (null !== $request->getRaws()) {
28+
$item->setRaws($request->getRaws());
29+
}
2730
$item->moveTo($directory);
2831
$this->repository->save($item);
2932
}

0 commit comments

Comments
 (0)