From b0162ae18416f9f952e40f4d7c8cde4005476767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=C4=9Bzslav=20Dvo=C5=99=C3=A1k?= Date: Thu, 18 Apr 2024 16:27:09 +0200 Subject: [PATCH] Preaprations for trait "kod" further use --- src/AbraFlexi/RO.php | 2 ++ src/AbraFlexi/kod.php | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/AbraFlexi/RO.php b/src/AbraFlexi/RO.php index f9e87a2c..e5d8eb19 100644 --- a/src/AbraFlexi/RO.php +++ b/src/AbraFlexi/RO.php @@ -2008,6 +2008,8 @@ public function getRecordID() * Obtain record/object identificator code: * Vrací identifikátor objektu code: * + * @todo move to "kod" trait + * * @link https://demo.flexibee.eu/devdoc/identifiers Identifikátory záznamů * * @return string record code identifier diff --git a/src/AbraFlexi/kod.php b/src/AbraFlexi/kod.php index a5de11a4..cf3477f2 100644 --- a/src/AbraFlexi/kod.php +++ b/src/AbraFlexi/kod.php @@ -17,4 +17,16 @@ */ trait kod { + /** + * Obtain record/object identificator code: + * Vrací identifikátor objektu code: + * + * @link https://demo.flexibee.eu/devdoc/identifiers Identifikátory záznamů + * + * @return string record code identifier + */ + public function _getRecordCode() + { + return empty($this->getDataValue('kod')) ? null : self::code($this->getDataValue('kod')); + } }