Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit c196bba

Browse files
Merge pull request #36 from BaranekD/description
New property to Facility model: description
2 parents d9a45db + b2dbc20 commit c196bba

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
44
## [Unreleased]
55
[Added]
66
- Added badges to README
7+
- Added new property to Facility model: description
78

89
## [v1.0.0]
910

lib/AdapterRpc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public function getFacilitiesByEntityId($spEntityId)
248248
));
249249
$facilities = array();
250250
foreach ($perunAttrs as $perunAttr) {
251-
array_push($facilities, new sspmod_perun_model_Facility($perunAttr['id'], $perunAttr['name'], $spEntityId));
251+
array_push($facilities, new sspmod_perun_model_Facility($perunAttr['id'], $perunAttr['name'], $perunAttr['description'], $spEntityId));
252252
}
253253
return $facilities;
254254
}

lib/model/Facility.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,21 @@ class sspmod_perun_model_Facility implements sspmod_perun_model_HasId
99
{
1010
private $id;
1111
private $name;
12+
private $description;
1213
private $entityId;
1314

1415
/**
1516
* sspmod_perun_model_Vo constructor.
1617
* @param int $id
1718
* @param string $name
19+
* @param string $description
1820
* @param string $shortName
1921
*/
20-
public function __construct($id, $name, $entityId)
22+
public function __construct($id, $name, $description, $entityId)
2123
{
2224
$this->id = $id;
2325
$this->name = $name;
26+
$this->description = $description;
2427
$this->entityId = $entityId;
2528
}
2629

@@ -37,6 +40,14 @@ public function getName()
3740
return $this->name;
3841
}
3942

43+
/**
44+
* @return string
45+
*/
46+
public function getDescription()
47+
{
48+
return $this->description;
49+
}
50+
4051
/**
4152
* @return string
4253
*/

0 commit comments

Comments
 (0)