src/action/ObjectsEditAction.php
public function run(Request $request) {
		$object = ObjectQuery::create()->findOneById($this->getParam('objectId'));
		$data = ['sport' => $object->getSport(), 'object' => $object];
		$payload = new Blank($data);
		if ($request->isMethod('POST')) {
			$post = $request->request;

			$domain = new ObjectDomain($this->getServiceContainer());
			$serializer = Object::getSerializer();

			$fields = $serializer->getFields();
			$attribs = [];

			foreach ($fields as $field) {
				if ($post->has($field)) {
					$attribs[$field] = $post->get($field);
				}
			}

			$attribs['fixed'] = $post->has('fixed');

			$payload = $domain->update($object->getId(), ['attributes' => $attribs]);
			if ($payload instanceof NotValid) {
				$payload = new NotValid(array_merge($data, $payload->get()));
			}
		}

		return $this->responder->run($request, $payload);
	}
public function run(Request $request) {
		$object = ObjectQuery::create()->findOneById($this->getParam('objectId'));
		$data = ['sport' => $object->getSport(), 'object' => $object];
		$payload = new Blank($data);
		if ($request->isMethod('POST')) {
			$post = $request->request;

			$domain = new ObjectDomain($this->getServiceContainer());
			$serializer = Object::getSerializer();

			$fields = $serializer->getFields();
			$attribs = [];

			foreach ($fields as $field) {
				if ($post->has($field)) {
					$attribs[$field] = $post->get($field);
				}
			}

			$attribs['fixed'] = $post->has('fixed');

			$payload = $domain->update($object->getId(), ['attributes' => $attribs]);
			if ($payload instanceof NotValid) {
				$payload = new NotValid(array_merge($data, $payload->get()));
			}
		}

		return $this->responder->run($request, $payload);
	}
Automatically generated run method

@param Request $request
@return Response