private function createDataItems(array $data)
    {
        $items = [];
        foreach ($data as $item) {
            $items[$item['label']] = new UserDataItem(
                $item['label'],
                $item['value'],
                $item['isValid'],
                $item['isOwner']
            );
        }

        return $items;
    }
private function createDataItems(array $data)
    {
        $items = [];
        foreach ($data as $item) {
            $items[$item['label']] = new UserDataItem(
                $item['label'],
                $item['value'],
                $item['isValid'],
                $item['isOwner']
            );
        }

        return $items;
    }
private function createDataItems ( array $ data ) { $ items = [ ] ; foreach ( $ data as $ item ) { $ items [ $ item [ 'label' ] ] = new UserDataItem ( $ item [ 'label' ] , $ item [ 'value' ] , $ item [ 'isValid' ] , $ item [ 'isOwner' ] ) ; } return $ items ; }
Creates data item object from array.

@param array $data
@return array
Creates data item object from array .