common/models/resources/File.php
public function loadFiles( $name, $files = [] ) {

		$filesToLoad	= Yii::$app->request->post( $name );
		$count			= count( $filesToLoad );

		if ( $count > 0 ) {

			$filesToLoad  = [];

			// TODO: Use existing file models using $files param.
			for( $i = 0; $i < $count; $i++ ) {

				$filesToLoad[] = new File();
			}

			File::loadMultiple( $filesToLoad, Yii::$app->request->post(), $name );

			return $filesToLoad;
		}

		return $files;
	}
public function loadFiles( $name, $files = [] ) {

		$filesToLoad	= Yii::$app->request->post( $name );
		$count			= count( $filesToLoad );

		if ( $count > 0 ) {

			$filesToLoad  = [];

			// TODO: Use existing file models using $files param.
			for( $i = 0; $i < $count; $i++ ) {

				$filesToLoad[] = new File();
			}

			File::loadMultiple( $filesToLoad, Yii::$app->request->post(), $name );

			return $filesToLoad;
		}

		return $files;
	}
public function loadFiles ( $ name , $ files = [ ] ) { $ filesToLoad = Yii :: $ app -> request -> post ( $ name ) ; $ count = count ( $ filesToLoad ) ; if ( $ count > 0 ) { $ filesToLoad = [ ] ; // TODO: Use existing file models using $files param. for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { $ filesToLoad [ ] = new File ( ) ; } File :: loadMultiple ( $ filesToLoad , Yii :: $ app -> request -> post ( ) , $ name ) ; return $ filesToLoad ; } return $ files ; }
Load file attributes submitted by form and return the updated file models.

@param string $name
@param File[] $files
@return File - after loading from request url
Load file attributes submitted by form and return the updated file models .