Skip to content

Commit 91be9bb

Browse files
committed
stripBody function added
1 parent 6f646af commit 91be9bb

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/AbraFlexi/RO.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,24 @@ public function setDataValue(string $columnName, $value) {
652652
}
653653
return $result;
654654
}
655+
656+
/**
657+
* Strip all non-identifier data
658+
*/
659+
public function stripBody() {
660+
$id = $this->getRecordID();
661+
$code = $this->getRecordCode();
662+
$extIds = $this->getExternalIDs();
663+
$this->dataReset();
664+
$this->setMyKey($id);
665+
$columns = $this->getColumnsInfo();
666+
if (array_key_exists('kod', $columns)) {
667+
$this->setDataValue('kod', $code);
668+
}
669+
if (!empty($extIds)) {
670+
$this->setDataValue('external-ids', $columns);
671+
}
672+
}
655673

656674
/**
657675
* PHP Date object to AbraFlexi date format

0 commit comments

Comments
 (0)