Skip to content

Commit 6f6ce45

Browse files
committed
fix: serialization of UncontrolledSubject
1 parent 91549aa commit 6f6ce45

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/Fields/UncontrolledSubject.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
class UncontrolledSubject extends Subfield implements SubjectInterface
66
{
7+
/**
8+
* @var array List of properties to be included when serializing the record using the `toArray()` method.
9+
*/
10+
public $properties = ['type', 'vocabulary', 'term', 'id'];
11+
712
public function getType()
813
{
914
return Subject::UNCONTROLLED_INDEX_TERM;
@@ -36,14 +41,4 @@ public function __toString()
3641
{
3742
return $this->getTerm();
3843
}
39-
40-
public function jsonSerialize()
41-
{
42-
return [
43-
'type' => $this->getType(),
44-
'vocabulary' => $this->getVocabulary(),
45-
'id' => $this->getControlNumber(),
46-
'term' => (string) $this,
47-
];
48-
}
4944
}

0 commit comments

Comments
 (0)