src/Model/AssociationsAwareTrait.php
private function setByTypeFileField(CsvField $field) : void
    {
        if (! in_array($field->getType(), ['files', 'images'])) {
            return;
        }

        $this->setAssociation(
            'hasMany',
            static::generateAssociationName(FileUpload::FILE_STORAGE_TABLE_NAME, $field->getName()),
            [
                'className' => FileUpload::FILE_STORAGE_TABLE_NAME,
                'foreignKey' => 'foreign_key',
                'conditions' => ['model' => $this->getTable(), 'model_field' => $field->getName()]
            ]
        );
    }
private function setByTypeFileField(CsvField $field) : void
    {
        if (! in_array($field->getType(), ['files', 'images'])) {
            return;
        }

        $this->setAssociation(
            'hasMany',
            static::generateAssociationName(FileUpload::FILE_STORAGE_TABLE_NAME, $field->getName()),
            [
                'className' => FileUpload::FILE_STORAGE_TABLE_NAME,
                'foreignKey' => 'foreign_key',
                'conditions' => ['model' => $this->getTable(), 'model_field' => $field->getName()]
            ]
        );
    }
private function setByTypeFileField ( CsvField $ field ) : void { if ( ! in_array ( $ field -> getType ( ) , [ 'files' , 'images' ] ) ) { return ; } $ this -> setAssociation ( 'hasMany' , static :: generateAssociationName ( FileUpload :: FILE_STORAGE_TABLE_NAME , $ field -> getName ( ) ) , [ 'className' => FileUpload :: FILE_STORAGE_TABLE_NAME , 'foreignKey' => 'foreign_key' , 'conditions' => [ 'model' => $ this -> getTable ( ) , 'model_field' => $ field -> getName ( ) ] ] ) ; }
Set associations by file type field, for "module" type Modules.

@param \CsvMigrations\FieldHandlers\CsvField $field CSV Field instance
@return void
Set associations by file type field for module type Modules .