Skip to content

Commit

Permalink
stripBody function added
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Oct 19, 2021
1 parent 6f646af commit 91be9bb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/AbraFlexi/RO.php
Expand Up @@ -652,6 +652,24 @@ public function setDataValue(string $columnName, $value) {
}
return $result;
}

/**
* Strip all non-identifier data
*/
public function stripBody() {
$id = $this->getRecordID();
$code = $this->getRecordCode();
$extIds = $this->getExternalIDs();
$this->dataReset();
$this->setMyKey($id);
$columns = $this->getColumnsInfo();
if (array_key_exists('kod', $columns)) {
$this->setDataValue('kod', $code);
}
if (!empty($extIds)) {
$this->setDataValue('external-ids', $columns);
}
}

/**
* PHP Date object to AbraFlexi date format
Expand Down

0 comments on commit 91be9bb

Please sign in to comment.