public function getFlatModelErrors(ModelInterface $model)
    {
        $modelErrors = $this->getModelError($model);
        if (!$modelErrors) {
            return $modelErrors;
        }

        $errors = [[]];
        foreach ($this->getModelError($model) as $modelError) {
            $errors[] = $modelError;
        }

        return \array_merge(...$errors);
    }