baserCMS クラスリファレンス

BcMcpModelEventListener extends BcModelEventListener
in package

BcMcpModelEventListener

ユーザーが無効化・削除された際に、そのユーザーの OAuth2 トークンを失効させる。 トークンの検証時にもユーザーの状態を確認するが、失効させておくことで 無効化されたユーザーのトークンが DB に有効なまま残らないようにする

Table of Contents

Properties

$events  : array<string|int, mixed>
登録イベント
$layer  : string
レイヤー名
$plugin  : string
プラグイン名

Methods

__construct()  : mixed
コンストラクタ
baserCoreUsersAfterDelete()  : void
ユーザー削除後
baserCoreUsersAfterSave()  : void
ユーザー保存後
getAction()  : string
現在のアクションを特定する文字列を取得する
implementedEvents()  : array<string|int, mixed>
implementedEvents
isAction()  : bool
指定した文字列が現在のアクションとしてみなされるかどうか判定する

Properties

$events

登録イベント

public array<string|int, mixed> $events = ['BaserCore.Users.afterSave', 'BaserCore.Users.afterDelete']

Methods

__construct()

コンストラクタ

public __construct() : mixed
Tags
checked
noTodo
unitTest

baserCoreUsersAfterDelete()

ユーザー削除後

public baserCoreUsersAfterDelete(EventInterface $event, EntityInterface $entity, ArrayObject $options) : void
Parameters
$event : EventInterface
$entity : EntityInterface
$options : ArrayObject

baserCoreUsersAfterSave()

ユーザー保存後

public baserCoreUsersAfterSave(EventInterface $event, EntityInterface $entity, ArrayObject $options) : void

無効化(status = false)された場合はトークンを失効させる

Parameters
$event : EventInterface
$entity : EntityInterface
$options : ArrayObject

getAction()

現在のアクションを特定する文字列を取得する

public getAction([bool $isContainController = true ]) : string
Parameters
$isContainController : bool = true

コントローラー名を含むかどうか(初期値:true)

Tags
checked
noTodo
unitTest
Return values
string

implementedEvents()

implementedEvents

public implementedEvents() : array<string|int, mixed>
Tags
checked
noTodo
unitTest
Return values
array<string|int, mixed>

isAction()

指定した文字列が現在のアクションとしてみなされるかどうか判定する

public isAction(string $action[, bool $isContainController = true ]) : bool

コントローラー名、アクション名をキャメルケースに変換する前提で、ドットで結合した文字列とする (例)Users.AdminIndex

Parameters
$action : string

アクションを特定する為の文字列

$isContainController : bool = true

コントローラー名を含むかどうか(初期値:true)

Tags
checked
noTodo
unitTest
Return values
bool
On this page

Search results