createModelFile example

if (!empty($tableNames) && !\in_array($tableName$tableNames)) {
                continue;
            }

            if (!$this->stringEndsWith($tableName, '_attributes')) {
                continue;
            }

            $table = $this->getSchemaManager()->listTableDetails($tableName);

            $sourceCode = $this->generateModel($table);
            $result = $this->createModelFile($table$sourceCode);
            if ($result === false) {
                $errors[] = $table->getName();
            }
        }

        return ['success' => empty($errors), 'errors' => $errors];
    }

    /** * @param \Doctrine\DBAL\Schema\Table $table * @param string $sourceCode * * @throws Exception * * @return bool */
Home | Imprint | This part of the site doesn't use cookies.