src/DataStore/src/DataStore/Traits/AutoIdGeneratorTrait.php
protected function prepareItem(array $itemData)
    {
        if (!isset($itemData[$this->getIdentifier()])) {
            $itemData[$this->getIdentifier()] = $this->generateId();
        }

        return $itemData;
    }
protected function prepareItem(array $itemData)
    {
        if (!isset($itemData[$this->getIdentifier()])) {
            $itemData[$this->getIdentifier()] = $this->generateId();
        }

        return $itemData;
    }
protected function prepareItem ( array $ itemData ) { if ( ! isset ( $ itemData [ $ this -> getIdentifier ( ) ] ) ) { $ itemData [ $ this -> getIdentifier ( ) ] = $ this -> generateId ( ) ; } return $ itemData ; }
Generate id to item

@param array $itemData
@return array
@throws DataStoreException
Generate id to item