baserCMS クラスリファレンス

EditorTemplatesController extends BcAdminAppController
in package

Class EditorTemplatesController

エディタテンプレートコントローラー

エディタテンプレートの管理を行う

Table of Contents

Properties

$Authentication  : AuthenticationComponent
$Authentication  : AuthenticationComponent
$BcMessage  : BcMessageComponent
$Paginator  : PaginatorComponent
$Security  : SecurityComponent
$_View  : View
View

Methods

__construct()  : void|ResponseInterface
AppController constructor.
_blackHoleCallback()  : void
Securityコンポーネントのブラックホールからのコールバック
add()  : mixed
エディタテンプレートを新しく登録する
ajaxError()  : void
Ajax用のエラーを出力する
beforeFilter()  : Response|void
Before Filter
beforeRender()  : Response|void|null
Before render
delete()  : Response|void|null
[ADMIN] 削除
dispatchLayerEvent()  : bool|Event
イベントを発火
edit()  : mixed
[ADMIN] 編集
getService()  : array<string|int, mixed>|mixed|object
Get Service
hasService()  : bool
Has Service
index()  : mixed
エディタテンプレートの一覧を表示する
initialize()  : void
Initialize
js()  : mixed
[ADMIN] CKEditor用テンプレート用のjavascriptを出力する
notFound()  : void
NOT FOUNDページを出力する
redirectIfIsNotSameSite()  : Response|void|null
siteUrlや、sslUrlと現在のURLが違う場合には、そちらのURLにリダイレクトを行う setting.php にて、cmsUrlとして、cmsUrlを定義した場合にはそちらを優先する
redirectIfIsRequireMaintenance()  : Response|void|null
メンテナンス画面へのリダイレクトが必要な場合にリダイレクトする
setTitle()  : void
Set Title
setupFrontView()  : void
フロント用のViewクラスをセットアップする
_checkReferer()  : bool
リファラチェックを行う
loadViewConditions()  : void
画面の情報をセッションから読み込む
saveDblog()  : EntityInterface
データベースログを記録する
saveViewConditions()  : void
画面の情報をセッションに保存する
setAdminTheme()  : void
管理画面用テーマをセットする
setHelp()  : void
Set Help
setSearch()  : void
Set Search
setViewConditions()  : void
画面の情報をセットする
__cleanupQueryParams()  : void
クエリーパラメーターの調整 環境によって?キーにamp;が付加されてしまうため
__updateFirstAccess()  : void
初回アクセスメッセージ用のフラグを更新する
checkPermission()  : bool
アクセスルールの権限を確認する

Properties

$Authentication

public AuthenticationComponent $Authentication

Methods

__construct()

AppController constructor.

public __construct([ServerRequest|null $request = null ][, Response|null $response = null ][, string|null $name = null ][, EventManagerInterface|null $eventManager = null ][, ComponentRegistry|null $components = null ]) : void|ResponseInterface
Parameters
$request : ServerRequest|null = null
$response : Response|null = null
$name : string|null = null
$eventManager : EventManagerInterface|null = null
$components : ComponentRegistry|null = null
Tags
checked
noTodo
unitTest
Return values
void|ResponseInterface

_blackHoleCallback()

Securityコンポーネントのブラックホールからのコールバック

public _blackHoleCallback(string $err, mixed $exception) : void

フォーム改ざん対策・CSRF対策・SSL制限・HTTPメソッド制限などへの違反が原因で Securityコンポーネントに"ブラックホールされた"場合の動作を指定する

Parameters
$err : string

エラーの種類

$exception : mixed
Tags
throws
BadRequestException
uses
_blackHoleCallback
checked
noTodo
unitTest

ajaxError()

Ajax用のエラーを出力する

public ajaxError([int $errorNo = 500 ][, mixed $message = '' ]) : void
Parameters
$errorNo : int = 500

エラーのステータスコード

$message : mixed = ''

エラーメッセージ

Tags
deprecated

since 5.0.5 このメソッドは非推奨です。

checked
noTodo

beforeFilter()

Before Filter

public beforeFilter(EventInterface $event) : Response|void
Parameters
$event : EventInterface
Tags
checked
noTodo
unitTest
Return values
Response|void

beforeRender()

Before render

public beforeRender(EventInterface $event) : Response|void|null
Parameters
$event : EventInterface
Tags
checked
noTodo
unitTest
Return values
Response|void|null

dispatchLayerEvent()

イベントを発火

public dispatchLayerEvent(string $name[, array<string|int, mixed> $data = [] ][, mixed $options = [] ]) : bool|Event
Parameters
$name : string
$data : array<string|int, mixed> = []
$options : mixed = []
Tags
checked
unitTest
noTodo
Return values
bool|Event

getService()

Get Service

public getService( $service) : array<string|int, mixed>|mixed|object
Parameters
$service :
Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>|mixed|object

hasService()

Has Service

public hasService( $service) : bool
Parameters
$service :
Tags
checked
noTodo
unitTest
Return values
bool

initialize()

Initialize

public initialize() : void
Tags
checked
unitTest
note

(value="BcEmailを実装したあとに確認")

notFound()

NOT FOUNDページを出力する

public notFound() : void
Tags
throws
NotFoundException
checked
noTodo
unitTest

redirectIfIsNotSameSite()

siteUrlや、sslUrlと現在のURLが違う場合には、そちらのURLにリダイレクトを行う setting.php にて、cmsUrlとして、cmsUrlを定義した場合にはそちらを優先する

public redirectIfIsNotSameSite() : Response|void|null
Tags
checked
noTodo
unitTest
Return values
Response|void|null

redirectIfIsRequireMaintenance()

メンテナンス画面へのリダイレクトが必要な場合にリダイレクトする

public redirectIfIsRequireMaintenance() : Response|void|null
Tags
checked
noTodo
unitTest
Return values
Response|void|null

setTitle()

Set Title

public setTitle(string $title) : void
Parameters
$title : string
Tags
checked
noTodo
unitTest

setupFrontView()

フロント用のViewクラスをセットアップする

public setupFrontView() : void
Tags
checked
noTodo
unitTest

_checkReferer()

リファラチェックを行う

protected _checkReferer() : bool
Tags
checked
noTodo
unitTest
Return values
bool

loadViewConditions()

画面の情報をセッションから読み込む

protected loadViewConditions([array<string|int, mixed> $targetModel = [] ][, array<string|int, mixed>|string $options = [] ]) : void

初期値が設定されている場合は初期値を設定した上で、セッションで上書きし、 ServerRequestに設定する。

Parameters
$targetModel : array<string|int, mixed> = []
$options : array<string|int, mixed>|string = []

オプション

  • default: 読み出す初期値(初期値:[])
  • group: 保存するグループ名(初期値:'')
  • post: POSTデータを保存するかどうか(初期値:true)
  • get: GETデータを保存するかどうか(初期値:false)
Tags
see

setViewConditions, saveViewConditions

checked
noTodo
unitTest

saveDblog()

データベースログを記録する

protected saveDblog(string $message) : EntityInterface
Parameters
$message : string
Tags
checked
unitTest
noTodo
Return values
EntityInterface

saveViewConditions()

画面の情報をセッションに保存する

protected saveViewConditions([array<string|int, mixed> $targetModel = [] ][, array<string|int, mixed> $options = [] ]) : void

次のセッション名に保存。

  • POSTデータ: BcApp.viewConditions.{$contentsName}.data.{$model}
  • クエリパラメーター: BcApp.viewConditions.{$contentsName}.query

$contentsNameは次の形式となる。 {$controllerName}{$actionName}.{$group}

ただし、ページネーションにおいて、1ページ目はクエリパラメーターpage を付けない仕様となっているため page は保存しない。

Parameters
$targetModel : array<string|int, mixed> = []
$options : array<string|int, mixed> = []

オプション

  • group: 保存するグループ名(初期値:'')
  • post: POSTデータを保存するかどうか(初期値:true)
  • get: GETデータを保存するかどうか(初期値:false)
Tags
see
setViewConditions
checked
noTodo
unitTest

setAdminTheme()

管理画面用テーマをセットする

protected setAdminTheme() : void

優先順位 BcSiteConfig::get('admin_theme') > Configure::read('BcApp.adminTheme')

Tags
checked
noTodo
unitTest

setHelp()

Set Help

protected setHelp(string $template) : void
Parameters
$template : string
Tags
checked
noTodo
unitTest

setSearch()

Set Search

protected setSearch(string $template) : void
Parameters
$template : string
Tags
checked
noTodo
unitTest

setViewConditions()

画面の情報をセットする

protected setViewConditions([array<string|int, mixed> $targetModel = [] ][, array<string|int, mixed> $options = [] ]) : void

POSTデータとクエリパラメーターをセッションに保存した上で、 指定されたデフォルト値も含めて ServerRequest に設定する。

$this->setViewConditions(['Content'], [
    'group' => 'index',
    'default' => [
         'query' => ['limit' => 10],
         'data' => ['title' => 'default']
     ],
    'get' => true
]);
Parameters
$targetModel : array<string|int, mixed> = []

ターゲットとなるモデル

$options : array<string|int, mixed> = []

オプション

  • default: 読み出す初期値(初期値:[])
  • group: 保存するグループ名(初期値:'')
  • post: POSTデータを保存するかどうか(初期値:true)
  • get: GETデータを保存するかどうか(初期値:false)
Tags
checked
noTodo
unitTest

__cleanupQueryParams()

クエリーパラメーターの調整 環境によって?キーにamp;が付加されてしまうため

private __cleanupQueryParams() : void
Tags
checked
noTodo
unitTest

__updateFirstAccess()

初回アクセスメッセージ用のフラグを更新する

private __updateFirstAccess() : void
Tags
checked
noTodo

checkPermission()

アクセスルールの権限を確認する

private checkPermission() : bool

現在アクセスしているURLについて権限があるかどうかを確認する。

Tags
noTodo
checked
Return values
bool

        
On this page

Search results