\UploadFileValidateBehavior

Class UploadFileValidateBehavior

Summary

Methods
Properties
Constants
isAllowUploadFileExtension()
getAllowExtension()
getTotalSizeByRoomId()
validateRoomFileSizeLimit()
No public properties found
No constants found
_getField()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

isAllowUploadFileExtension()

isAllowUploadFileExtension(\Model  $model, string  $extension) : boolean

NetCommons3のセキュリティ設定で許可されている拡張子かチェックする

Parameters

\Model $model

Model

string $extension

拡張子

Returns

boolean

getAllowExtension()

getAllowExtension(\Model  $model) : array

NetCommons3のセキュリティ設定で許可されている拡張子のリストを返す

Parameters

\Model $model

Model

Returns

array

getTotalSizeByRoomId()

getTotalSizeByRoomId(\Model  $model, integer  $roomId) : integer

ルームのファイルサイズ合計を返す 履歴データは含まない。

Parameters

\Model $model

Model

integer $roomId

ルームID

Returns

integer —

合計ファイルサイズ(Byte)

validateRoomFileSizeLimit()

validateRoomFileSizeLimit(\Model  $model, array  $check) : boolean|string

NetCommons3のシステム管理→一般設定で許可されているルーム容量内かをチェックするバリデータ

Parameters

\Model $model

Model

array $check

バリデートする値

Returns

boolean|string —

容量内: true, 容量オーバー: string エラーメッセージ

_getField()

_getField(array  $check) : string

Returns the field to check

Parameters

array $check

array of validation data

Returns

string