BurgerEditorService
in package
Table of Contents
Properties
- $bgEditorBase : mixed
- $imageFileBaseDir : string
- 画像の保存先パス
- $imageFileBaseURL : string
- 画像の公開URL
- $imageFileMaxId : int
- 画像ファイルの最大ID
- $otherFileBaseDir : string
- 画像以外のファイルの保存先パス
- $otherFileBaseURL : string
- 画像以外のファイルの公開URL
- $otherFileMaxId : int
- 画像以外のファイルの最大ID
- $useAddonList : array<string|int, mixed>
- 利用したタイプ
Methods
- __construct() : mixed
- element() : void
- タイプの表示用テンプレートを出力する
- getAddonList() : array<string|int, mixed>
- 利用したタイプの一覧を取得する
- getBasePath() : string
- プラグインの基準パスを取得する
- getBlockPath() : string
- ブロックの基準パスを取得する
- getFileList() : array<string|int, mixed>
- 画像以外のファイルの一覧を取得する
- getFileListWithPagination() : array<string|int, mixed>
- レスポンス用のファイルリストとページネーションを作成する
- getImageFileBaseDir() : string
- 画像の保存先パスを取得する
- getImageFileBaseURL() : string
- 画像の公開URLを取得する
- getImageList() : array<string|int, mixed>
- 画像ファイルの一覧を取得する
- getOtherFileBaseDir() : string
- 画像以外のファイルの保存先パスを取得する
- getOtherFileBaseURL() : string
- 画像以外のファイルの公開URLを取得する
- getTypePath() : string
- タイプの基準パスを取得する
- nextImageFileId() : int
- 画像ファイルの次のIDを採番する
- nextOtherFileId() : int
- 画像以外のファイルの次のIDを採番する
- rotateImage() : bool
- 画像をExif情報を元に正しい確度に回転する
- setupSavePath() : void
- 保存先のパスとURLを解決する
- addAddonList() : void
- 利用したタイプを記録する
- getFileId() : mixed
- ファイル名からIDを取得する
Properties
$bgEditorBase
protected
mixed
$bgEditorBase
$imageFileBaseDir
画像の保存先パス
protected
string
$imageFileBaseDir
= ''
$imageFileBaseURL
画像の公開URL
protected
string
$imageFileBaseURL
= ''
$imageFileMaxId
画像ファイルの最大ID
protected
int
$imageFileMaxId
= 0
$otherFileBaseDir
画像以外のファイルの保存先パス
protected
string
$otherFileBaseDir
= ''
$otherFileBaseURL
画像以外のファイルの公開URL
protected
string
$otherFileBaseURL
= ''
$otherFileMaxId
画像以外のファイルの最大ID
protected
int
$otherFileMaxId
= 0
$useAddonList
利用したタイプ
protected
array<string|int, mixed>
$useAddonList
= []
Methods
__construct()
public
__construct([array<string|int, mixed> $config = [] ]) : mixed
Parameters
- $config : array<string|int, mixed> = []
element()
タイプの表示用テンプレートを出力する
public
element(string $name) : void
Addon を提供するプラグイン側のタイプも対象とするため、 パスの解決は BurgerEditorUtil に委譲する
Parameters
- $name : string
-
タイプ名
getAddonList()
利用したタイプの一覧を取得する
public
getAddonList() : array<string|int, mixed>
Return values
array<string|int, mixed>getBasePath()
プラグインの基準パスを取得する
public
getBasePath() : string
Return values
stringgetBlockPath()
ブロックの基準パスを取得する
public
getBlockPath() : string
Return values
stringgetFileList()
画像以外のファイルの一覧を取得する
public
getFileList() : array<string|int, mixed>
あわせて最大IDを更新する
Return values
array<string|int, mixed>getFileListWithPagination()
レスポンス用のファイルリストとページネーションを作成する
public
static getFileListWithPagination(array<string|int, mixed> $fileList, int $targetPage, int $selectedFileId, int $pageNum) : array<string|int, mixed>
Parameters
- $fileList : array<string|int, mixed>
- $targetPage : int
- $selectedFileId : int
- $pageNum : int
Return values
array<string|int, mixed> —該当ページ分のファイルリスト(data)とページネーション情報(pagination)を含む
getImageFileBaseDir()
画像の保存先パスを取得する
public
getImageFileBaseDir() : string
Return values
stringgetImageFileBaseURL()
画像の公開URLを取得する
public
getImageFileBaseURL() : string
Return values
stringgetImageList()
画像ファイルの一覧を取得する
public
getImageList() : array<string|int, mixed>
あわせて最大IDを更新する
Return values
array<string|int, mixed>getOtherFileBaseDir()
画像以外のファイルの保存先パスを取得する
public
getOtherFileBaseDir() : string
Return values
stringgetOtherFileBaseURL()
画像以外のファイルの公開URLを取得する
public
getOtherFileBaseURL() : string
Return values
stringgetTypePath()
タイプの基準パスを取得する
public
getTypePath() : string
Return values
stringnextImageFileId()
画像ファイルの次のIDを採番する
public
nextImageFileId() : int
Return values
intnextOtherFileId()
画像以外のファイルの次のIDを採番する
public
nextOtherFileId() : int
Return values
introtateImage()
画像をExif情報を元に正しい確度に回転する
public
rotateImage(mixed $file) : bool
Parameters
- $file : mixed
Return values
boolsetupSavePath()
保存先のパスとURLを解決する
public
setupSavePath() : void
保存先フォルダが無い場合はプラグインの初期化処理で作成し、 Bge.fileShare が無効の場合はログインユーザ別のフォルダを用意する
addAddonList()
利用したタイプを記録する
protected
addAddonList(string $name) : void
Parameters
- $name : string
-
タイプ名
getFileId()
ファイル名からIDを取得する
protected
static getFileId(string $fileName) : mixed
Parameters
- $fileName : string
-
ファイル名
Return values
mixed —(int|null)