PHP Class BcContentsComponent

階層コンテンツと連携したフォーム画面を作成する為のコンポーネント 《役割》 - コンテンツ一覧へのパンくずを自動追加 - フロントエンドでコンテンツデータを設定 Controller / View にて、$this->request->params['Content'] で参照できる - コンテンツ保存フォームを自動表示 - コンテンツ保存フォームのデータソースを設定 - コンテンツ保存フォームの初期値を設定
Inheritance: extends Component
Show file Open project: baserproject/basercms

Public Properties

Property Type Description
$editAction string コンテンツ編集用のアクション名 判定に利用 settings で指定する
$preview プレビューモード
$type string コンテンツタイプ settings で指定する
$useForm boolean Content 保存フォームをコントローラーで利用するかどうか settings で指定する
$useViewCache boolean ビューキャッシュを利用するかどうか

Protected Properties

Property Type Description
$_Controller Controller コントローラー

Public Methods

Method Description
beforeRender ( Controller $controller ) : void Before render
getContent ( integer $entityId = null ) : array Content データを取得する
getCrumbs ( $id ) : array パンくず用のデータを取得する
getParentLayoutTemplate ( $id ) : string レイアウトテンプレートを取得する
getTypes ( ) : array 登録されているタイプの一覧を取得する
initialize ( Controller $controller ) : void Initialize
settingForm ( Controller $controller, $currentSiteId, $currentContentId = null ) : void コンテンツ保存フォームを設定する
setupAdmin ( ) 管理システム設定
setupFront ( ) フロントエンドのセットアップ

Method Details

beforeRender() public method

Before render
public beforeRender ( Controller $controller ) : void
$controller Controller
return void

getContent() public method

Content データを取得する
public getContent ( integer $entityId = null ) : array
$entityId integer
return array

getCrumbs() public method

パンくず用のデータを取得する
public getCrumbs ( $id ) : array
$id
return array

getParentLayoutTemplate() public method

レイアウトテンプレートを取得する
public getParentLayoutTemplate ( $id ) : string
$id
return string $parentTemplate|false

getTypes() public method

登録されているタイプの一覧を取得する
public getTypes ( ) : array
return array

initialize() public method

Initialize
public initialize ( Controller $controller ) : void
$controller Controller Controller with components to initialize
return void

settingForm() public method

コンテンツ保存フォームを設定する
public settingForm ( Controller $controller, $currentSiteId, $currentContentId = null ) : void
$controller Controller
return void

setupAdmin() public method

管理システム設定
public setupAdmin ( )

setupFront() public method

フロントエンドのセットアップ
public setupFront ( )

Property Details

$_Controller protected property

コントローラー
protected Controller $_Controller
return Controller

$editAction public property

コンテンツ編集用のアクション名 判定に利用 settings で指定する
public string $editAction
return string

$preview public property

プレビューモード
public $preview

$type public property

コンテンツタイプ settings で指定する
public string $type
return string

$useForm public property

Content 保存フォームをコントローラーで利用するかどうか settings で指定する
public bool $useForm
return boolean

$useViewCache public property

ビューキャッシュを利用するかどうか
Deprecation: 5.0.0 since 4.0.0 CakePHP3では、ビューキャッシュは廃止となる為、別の方法に移行する
public bool $useViewCache
return boolean