Skip to content

Latest commit

 

History

History

api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

FileManager for Yii2

Table of Contents

FileBehavior

  • Full name: \rkit\filemanager\behaviors\FileBehavior
  • Parent class:

fileRelation

Get relation

FileBehavior::fileRelation( string $attribute ): \ActiveQuery

Parameters:

Parameter Type Description
$attribute string The attribute name

fileOption

Get file option

FileBehavior::fileOption( string $attribute, string $option, mixed $defaultValue = null ): mixed

Parameters:

Parameter Type Description
$attribute string The attribute name
$option string Option name
$defaultValue mixed Default value

fileStorage

Get file storage

FileBehavior::fileStorage( string $attribute ): \Flysystem

Parameters:

Parameter Type Description
$attribute string The attribute name

filePath

Get file path

FileBehavior::filePath( string $attribute, \yii\db\ActiveRecord $file = null ): string

Parameters:

Parameter Type Description
$attribute string The attribute name
$file \yii\db\ActiveRecord Use this file model

Return Value:

The file path


fileUrl

Get file url

FileBehavior::fileUrl( string $attribute, \yii\db\ActiveRecord $file = null ): string

Parameters:

Parameter Type Description
$attribute string The attribute name
$file \yii\db\ActiveRecord Use this file model

Return Value:

The file url


fileExtraFields

Get extra fields of file

FileBehavior::fileExtraFields( string $attribute ): array

Parameters:

Parameter Type Description
$attribute string The attribute name

files

Get files

FileBehavior::files( string $attribute ): array<mixed,\ActiveRecord>

Parameters:

Parameter Type Description
$attribute string The attribute name

Return Value:

The file models


file

Get the file

FileBehavior::file( string $attribute ): \ActiveRecord

Parameters:

Parameter Type Description
$attribute string The attribute name

Return Value:

The file model


fileRules

Get rules

FileBehavior::fileRules( string $attribute, boolean $onlyCoreValidators = false ): array

Parameters:

Parameter Type Description
$attribute string The attribute name
$onlyCoreValidators boolean Only core validators

fileState

Get file state

FileBehavior::fileState( string $attribute ): array

Parameters:

Parameter Type Description
$attribute string The attribute name

filePresetAfterUpload

Get the presets of the file for apply after upload

FileBehavior::filePresetAfterUpload( string $attribute ): array

Parameters:

Parameter Type Description
$attribute string The attribute name

thumbUrl

Create a thumb and return url

FileBehavior::thumbUrl( string $attribute, string $preset, \yii\db\ActiveRecord $file = null ): string

Parameters:

Parameter Type Description
$attribute string The attribute name
$preset string The preset name
$file \yii\db\ActiveRecord Use this file model

Return Value:

The file url


thumbPath

Create a thumb and return full path

FileBehavior::thumbPath( string $attribute, string $preset, \yii\db\ActiveRecord $file = null ): string

Parameters:

Parameter Type Description
$attribute string The attribute name
$preset string The preset name
$file \yii\db\ActiveRecord Use this file model

Return Value:

The file path


createFile

Create a file

FileBehavior::createFile( string $attribute, string $path, string $name ): \ActiveRecord

Parameters:

Parameter Type Description
$attribute string The attribute name
$path string The file path
$name string The file name

Return Value:

The file model



This document was automatically generated from source code comments on 2016-11-03 using phpDocumentor and cvuorinen/phpdoc-markdown-public