isIdentifierColumn example

foreach ($columns as $column) {
            $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']);
                

    private function filter($table$data)
    {
        $columns = $this->mapping->getTableColumns($table);
        $readOnly = $this->getReadOnlyColumns($table);

        $result = [];
        foreach ($columns as $column) {
            if ($this->mapping->isIdentifierColumn($table$column->getName())) {
                continue;
            }

            if (!\array_key_exists($column->getName()$data)) {
                continue;
            }

            if (\in_array($column->getName()$readOnly, true)) {
                continue;
            }

            

        if (!$name) {
            throw new Exception('No column name provided');
        }

        $this->validateField($table);
        $this->validateField($name);

        if (!$this->tableMapping->isAttributeTable($table)) {
            throw new Exception(sprintf('Provided table is no attribute table: %s', $table));
        }
        if ($this->tableMapping->isIdentifierColumn($table$name)) {
            throw new Exception(sprintf('Provided column is an identifier column: %s', $name));
        }

        $lowerCaseName = strtolower($name);
        if (\in_array($lowerCaseName$this->nameBlacklist)) {
            throw new Exception(sprintf('Provided name %s is a reserved keyword.', $name));
        }
    }

    /** * @param string $field * * @throws Exception */
Home | Imprint | This part of the site doesn't use cookies.