121 $prevState = self::createFromEncodedData($request->getPost(self::STATE_NAME_VAR));
124 foreach($request->getPostList()->toArray() as $name => $data)
126 if(is_array($data) &&
count($data) === 1 && ($data[0] !==
'0' && empty($data[0])))
129 unset($prevState[$name]);
133 if(is_array($data) && ($data[0] !==
'0' && empty($data[0])))
137 $postData[$name] = $data;
140 return new State(array_merge($prevState->toArray(), $postData));