baserCMS クラスリファレンス

BcUploadBehavior extends Behavior
in package

Class BcUploadBehavior

Table of Contents

Properties

$BcFileUploader  : array<string|int, BcFileUploader>
$BcFileUploader  : array<string|int, BcFileUploader>
BcFileUploader
$oldEntity  : array<string|int, EntityInterface>
Old Entity

Methods

afterMarshal()  : mixed
After Marshal
afterSave()  : mixed
After Save
beforeDelete()  : mixed
テーブル削除時に対象の画像ファイルの削除を行う 削除に失敗してもデータの削除は行う
beforeMarshal()  : mixed
Before Marshal
buildValidator()  : mixed
Build Validator
getFileUploader()  : BcFileUploader|false
getFileUploader
getOldEntity()  : EntityInterface|null
getOldEntity
getSaveDir()  : string
保存先のパスを取得
getSettings()  : mixed
設定情報を取得
initialize()  : void
Initialize
renameToBasenameFields()  : mixed
全フィールドのファイル名をフィールド値ベースのファイル名に変更する
saveTmpFiles()  : mixed
一時ファイルとして保存する
setSettings()  : mixed
設定情報を設定

Properties

$oldEntity

Old Entity

public array<string|int, EntityInterface> $oldEntity = []

Methods

afterMarshal()

After Marshal

public afterMarshal(EventInterface $event, EntityInterface $entity, ArrayObject $options) : mixed

バリデーションエラーが発生した際、ファイルアップロード対象のデータを元に戻す

Parameters
$event : EventInterface
$entity : EntityInterface
$options : ArrayObject
Tags
checked
noTodo

afterSave()

After Save

public afterSave(EventInterface $event, EntityInterface $entity) : mixed
Parameters
$event : EventInterface
$entity : EntityInterface
Tags
checked
noTodo
unitTest

beforeDelete()

テーブル削除時に対象の画像ファイルの削除を行う 削除に失敗してもデータの削除は行う

public beforeDelete(EventInterface $event, EntityInterface $entity) : mixed
Parameters
$event : EventInterface
$entity : EntityInterface
Tags
checked
noTodo
unitTest

beforeMarshal()

Before Marshal

public beforeMarshal(EventInterface $event, ArrayObject $data, ArrayObject $options) : mixed
Parameters
$event : EventInterface
$data : ArrayObject
$options : ArrayObject
Tags
checked
noTodo
unitTest

buildValidator()

Build Validator

public buildValidator(EventInterface $event, Validator $validator, string $name) : mixed
Parameters
$event : EventInterface
$validator : Validator
$name : string

getOldEntity()

getOldEntity

public getOldEntity(int $id) : EntityInterface|null
Parameters
$id : int
Tags
checked
noTodo
unitTest
Return values
EntityInterface|null

getSaveDir()

保存先のパスを取得

public getSaveDir([false $isTheme = false ][, false $limited = false ]) : string
Parameters
$isTheme : false = false
$limited : false = false
Tags
checked
noTodo
unitTest
Return values
string

getSettings()

設定情報を取得

public getSettings() : mixed
Tags
checked
noTodo
unitTest

initialize()

Initialize

public initialize(array<string|int, mixed> $config) : void
Parameters
$config : array<string|int, mixed>
Tags
checked
noTodo
unitTest

renameToBasenameFields()

全フィールドのファイル名をフィールド値ベースのファイル名に変更する

public renameToBasenameFields(EntityInterface $entity[, bool $copy = false ]) : mixed
Parameters
$entity : EntityInterface
$copy : bool = false
Tags
checked
noTodo
unitTest

saveTmpFiles()

一時ファイルとして保存する

public saveTmpFiles(array<string|int, mixed> $data, string $tmpId) : mixed
Parameters
$data : array<string|int, mixed>
$tmpId : string
Tags
checked
noTodo
unitTest
Return values
mixed

false|array

setSettings()

設定情報を設定

public setSettings( $settings) : mixed
Parameters
$settings :
Tags
checked
noTodo
unitTest

        
On this page

Search results