Skip to content

Commit

Permalink
add ImageUploadControl->getUploadValue()
Browse files Browse the repository at this point in the history
  • Loading branch information
MartkCz committed Apr 7, 2022
1 parent 8c833d2 commit 312f13a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Bridge/Nette/Form/ImageUploadControl.php
Expand Up @@ -29,6 +29,8 @@ final class ImageUploadControl extends UploadControl

private ?ImageRemoveInterface $remove = null;

private ?FileUpload $uploadValue = null;

public function __construct(?string $label = null)
{
$this->entity = new UploadControlEntity();
Expand All @@ -41,7 +43,7 @@ public function loadHttpData(): void
{
parent::loadHttpData();

$this->setValue($this->value);
$this->setValue($this->uploadValue = $this->value);

if ($this->remove) {
$removeAnyway = $this->remove->getHttpData($this);
Expand Down Expand Up @@ -108,6 +110,11 @@ public function getValue(): UploadControlEntity
return $this->entity;
}

public function getUploadValue(): ?FileUpload
{
return $this->uploadValue;
}

public function getControlPart(): ?Html
{
$control = parent::getControl();
Expand Down

0 comments on commit 312f13a

Please sign in to comment.