Skip to content

Commit

Permalink
Adding parentProjectId to RefIsiteOptions (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
votemike authored Aug 18, 2017
1 parent 6848da8 commit fd72eba
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
19 changes: 19 additions & 0 deletions src/Data/ProgrammesDb/Entity/RefIsiteOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ class RefIsiteOptions
*/
private $projectId;

/**
* @var string|null
*
* @ORM\Column(type="string", length=35, nullable=true)
*/
private $parentProjectId;

/**
* @var string
*
Expand Down Expand Up @@ -88,6 +95,7 @@ class RefIsiteOptions
public function __construct(
string $guid,
string $projectId,
string $parentProjectId,
string $entityId,
string $fileId,
string $type,
Expand All @@ -97,6 +105,7 @@ public function __construct(
) {
$this->guid = $guid;
$this->projectId = $projectId;
$this->parentProjectId = $parentProjectId;
$this->entityId = $entityId;
$this->fileId = $fileId;
$this->setType($type);
Expand Down Expand Up @@ -130,6 +139,16 @@ public function setProjectId(string $projectId)
$this->projectId = $projectId;
}

public function getParentProjectId(): ?string
{
return $this->parentProjectId;
}

public function setParentProjectId(?string $parentProjectId)
{
$this->parentProjectId = $parentProjectId;
}

public function getEntityId(): string
{
return $this->entityId;
Expand Down
4 changes: 3 additions & 1 deletion tests/Data/ProgrammesDb/Entity/RefIsiteOptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public function testDefaults()
$options = new RefIsiteOptions(
'guid',
'projectid',
'parentProjectid',
'entityId',
'fileId',
'admin',
Expand All @@ -30,8 +31,9 @@ public function testTypeSetterThrowErrorWhenNoValidValue()
{
new RefIsiteOptions(
'guid',
'entityId',
'projectid',
'parentProjectid',
'entityId',
'fileId',
'wrong type',
new DateTime('U'),
Expand Down

0 comments on commit fd72eba

Please sign in to comment.