Class humhub\modules\file\components\FileManager

Inheritancehumhub\modules\file\components\FileManager » yii\base\Component
Available since version1.2

FileManager

Public Methods

Hide inherited methods

MethodDescriptionDefined By
attach() Attach files to record. humhub\modules\file\components\FileManager
find() File find query humhub\modules\file\components\FileManager
findAll() Returns a list of files assigned to the record humhub\modules\file\components\FileManager
findStreamFiles() By default all files with show_in_stream set to 1. humhub\modules\file\components\FileManager

Property Details

$record public property

Method Details

attach() public method

Attach files to record.

This is required when uploaded before the related content is saved.

public void attach ( $files, $steal false )
$files string|array|humhub\modules\file\models\File

Of File records or comma separeted list of file guids or single File record

$steal boolean

Steal when already assigned to other record

find() public method

File find query

public \yii\db\ActiveQuery find ( )
return \yii\db\ActiveQuery

File find query

findAll() public method

Returns a list of files assigned to the record

public humhub\modules\file\models\File[] findAll ( )
return humhub\modules\file\models\File[]

Array of files assigned to the record

findStreamFiles() public method (available since version 1.2.2)

By default all files with show_in_stream set to 1.

If $flag is set to false, this function will return all non stream files.

public humhub\modules\file\models\File[] findStreamFiles ( $showInStream true )
$showInStream