resolveExtJsData example


    public function save($data)
    {
        $model = $this->getRepository()->find((int) ($data['id'] ?? 0));
        if ($model === null) {
            $model = new $this->model();
            $this->getManager()->persist($model);
        }

        $data = $this->resolveExtJsData($data);
        $model->fromArray($data);

        $violations = $this->getManager()->validate($model);
        $errors = [];
        foreach ($violations as $violation) {
            $errors[] = [
                'message' => $violation->getMessage(),
                'property' => $violation->getPropertyPath(),
            ];
        }

        
Home | Imprint | This part of the site doesn't use cookies.