improve doc storing

This commit is contained in:
2018-09-10 10:49:37 +02:00
parent 32402d8c7a
commit 0eccda06d6
7 changed files with 45 additions and 33 deletions

View File

@@ -49,6 +49,9 @@ class Document implements HasScopeInterface
* cascade={"persist"}
* )
* @Assert\Valid()
* @Assert\NotNull(
* message="Upload a document"
* )
*/
private $object;
@@ -113,18 +116,6 @@ class Document implements HasScopeInterface
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(string $content): self
{
$this->content = $content;
return $this;
}
/**
* Get scope
*

View File

@@ -37,15 +37,16 @@ class DocumentCategory
* @ORM\Column(type="json_array")
*/
private $name;
public function getBundleId() // ::class BundleClass (FQDN)
{
return $this->bundleId;
}
public function setBundleId($bundleId)
public function __construct($bundleId, $idInsideBundle)
{
$this->bundleId = $bundleId;
$this->idInsideBundle = $idInsideBundle;
}
public function getBundleId() // ::class BundleClass (FQDN)
{
return $this->bundleId;
}
public function getIdInsideBundle()
@@ -53,13 +54,6 @@ class DocumentCategory
return $this->idInsideBundle;
}
public function setIdInsideBundle($idInsideBundle): self
{
$this->idInsideBundle = $idInsideBundle;
return $this;
}
public function getDocumentClass()
{
return $this->documentClass;