src/Forms/FileUploadReceiver.php
public function getRelationAutosetClass($default = File::class)
    {
        // Don't autodetermine relation if no relationship between parent record
        if (!$this->getRelationAutoSetting()) {
            return $default;
        }

        // Check record and name
        $name = $this->getName();
        $record = $this->getRecord();
        if (empty($name) || empty($record)) {
            return $default;
        } else {
            $class = $record->getRelationClass($name);
            return empty($class) ? $default : $class;
        }
    }
public function getRelationAutosetClass($default = File::class)
    {
        // Don't autodetermine relation if no relationship between parent record
        if (!$this->getRelationAutoSetting()) {
            return $default;
        }

        // Check record and name
        $name = $this->getName();
        $record = $this->getRecord();
        if (empty($name) || empty($record)) {
            return $default;
        } else {
            $class = $record->getRelationClass($name);
            return empty($class) ? $default : $class;
        }
    }
public function getRelationAutosetClass ( $ default = File :: class ) { // Don't autodetermine relation if no relationship between parent record if ( ! $ this -> getRelationAutoSetting ( ) ) { return $ default ; } // Check record and name $ name = $ this -> getName ( ) ; $ record = $ this -> getRecord ( ) ; if ( empty ( $ name ) || empty ( $ record ) ) { return $ default ; } else { $ class = $ record -> getRelationClass ( $ name ) ; return empty ( $ class ) ? $ default : $ class ; } }
Gets the foreign class that needs to be created, or 'File' as default if there
is no relationship, or it cannot be determined.

@param string $default Default value to return if no value could be calculated
@return string Foreign class name.
Gets the foreign class that needs to be created or File as default if there is no relationship or it cannot be determined .