setCore example

public function parse(string $content): ChangelogDefinition
    {
        $content = trim($content);

        return (new ChangelogDefinition())
            ->setTitle($this->parseMetadata($content, 'title') ?: '')
            ->setIssue($this->parseMetadata($content, 'issue') ?: '')
            ->setFlag($this->parseMetadata($content, 'flag'))
            ->setAuthor($this->parseMetadata($content, 'author'))
            ->setAuthorEmail($this->parseMetadata($content, 'author_email'))
            ->setAuthorGitHub($this->parseMetadata($content, 'author_github'))
            ->setCore($this->parseSection($content, ChangelogSection::core->value))
            ->setAdministration($this->parseSection($content, ChangelogSection::administration->value))
            ->setStorefront($this->parseSection($content, ChangelogSection::storefront->value))
            ->setApi($this->parseSection($content, ChangelogSection::api->value))
            ->setUpgradeInformation($this->parseSection($content, ChangelogSection::upgrade->value))
            ->setNextMajorVersionChanges($this->parseSection($content, ChangelogSection::major->value));
    }

    /** * Retrieve the metadata of changelog */
    private function parseMetadata(string $content, string $meta): ?string
    {
$name = strtolower($column->getName());
            $default = $column->getDefault();

            if ($default === 'NULL') {
                $default = null;
            }

            $item = new ConfigurationStruct();
            $item->setTableName($table);
            $item->setColumnName($column->getName());
            $item->setIdentifier($this->tableMapping->isIdentifierColumn($table$column->getName()));
            $item->setCore($this->tableMapping->isCoreColumn($table$column->getName()));
            $item->setColumnType($this->typeMapping->dbalToUnified($column->getType()));
            $item->setElasticSearchType($this->typeMapping->unifiedToElasticSearch($item->getColumnType()));
            $item->setDefaultValue($default);

            if (isset($configuration[$name])) {
                $config = $configuration[$name];
                $item->setId((int) $config['id']);
                $item->setColumnType($config['columnType']);
                $item->setSupportText($config['supportText']);
                $item->setHelpText($config['helpText']);
                $item->setDisplayInBackend((bool) $config['displayInBackend']);
                
Home | Imprint | This part of the site doesn't use cookies.