isAssociation example

// Id columns do not need to be defined in the .xml, we do this automatically         $table->addColumn('id', Types::BINARY, ['length' => 16, 'fixed' => true]);
        $table->setPrimaryKey(['id']);

        // important: we add a `comment` to the table. This allows us to identify the custom entity modifications when run the cleanup         $table->setComment(self::COMMENT);

        // we have to add only fields, which are not marked as translated         $filtered = array_filter($fieldsfn (array $field) => ($field['translatable'] ?? false) === false);

        $filtered = array_filter($filteredfn (array $field) => !$this->isAssociation($field));

        $this->addColumns($schema$table$filtered);

        $binary = ['length' => 16, 'fixed' => true];

        $translated = array_filter($fieldsfn (array $field) => $field['translatable'] ?? false);

        if (empty($translated)) {
            return;
        }
        $languageTable = $schema->getTable('language');

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