return id of attribute as int

This commit is contained in:
Uwe Steinmann 2022-11-10 08:24:07 +01:00
parent cbf68b7ab6
commit 650339c519

View File

@ -56,14 +56,14 @@ class RestapiController { /* {{{ */
foreach($attributes as $attrdefid=>$attribute) { foreach($attributes as $attrdefid=>$attribute) {
$attrdef = $attribute->getAttributeDefinition(); $attrdef = $attribute->getAttributeDefinition();
$attrvalues[] = array( $attrvalues[] = array(
'id'=>$attrdef->getId(), 'id'=>(int) $attrdef->getId(),
'name'=>$attrdef->getName(), 'name'=>$attrdef->getName(),
'value'=>$attribute->getValue() 'value'=>$attribute->getValue()
); );
} }
} }
return $attrvalues; return $attrvalues;
} } /* }}} */
protected function __getDocumentData($document) { /* {{{ */ protected function __getDocumentData($document) { /* {{{ */
$data = array( $data = array(