個人用ツール

「ver4/関数リファレンス/getCurrentContent」の版間の差分

提供: baserCMS公式ガイド

移動: 案内, 検索
(ページの作成:「[このコンテンツは内容調整中です] ## 説明 現在のコンテンツ情報を取得する ## 使い方 <syntaxhighlight lang="php"> $this->BcBaser->getCur...」)
 
行6: 行6:
 
## 使い方
 
## 使い方
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
$this->BcBaser->getCurrentContent();
+
<?php $this->BcBaser->getCurrentContent(); ?>
 
</syntaxhighlight>
 
</syntaxhighlight>
  
行19: 行19:
 
## 用例
 
## 用例
 
### 基本
 
### 基本
 +
現在のコンテンツ情報を取得する。
 
####コード
 
####コード
 
<syntaxhighlight lang="php">
 
<syntaxhighlight lang="php">
 
+
<?php var_dump($this->BcBaser->getCurrentContent()); ?>
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
####出力
 
####出力
 
<syntaxhighlight lang="html5">
 
<syntaxhighlight lang="html5">
 
+
array (size=34)
 +
  'id' => string '11' (length=2)
 +
  'name' => string 'service1' (length=8)
 +
  'plugin' => string 'Core' (length=4)
 +
  'type' => string 'Page' (length=4)
 +
  'entity_id' => string '3' (length=1)
 +
  'url' => string '/service/service1' (length=17)
 +
  'site_id' => string '0' (length=1)
 +
  'alias_id' => null
 +
  'main_site_content_id' => null
 +
  'parent_id' => string '6' (length=1)
 +
  'lft' => string '35' (length=2)
 +
  'rght' => string '36' (length=2)
 +
  'level' => string '2' (length=1)
 +
  'title' => string 'サービス1' (length=15)
 +
  'description' => string '' (length=0)
 +
  'eyecatch' => string '' (length=0)
 +
  'author_id' => string '1' (length=1)
 +
  'layout_template' => string '' (length=0)
 +
  'status' => boolean true
 +
  'publish_begin' => null
 +
  'publish_end' => null
 +
  'self_status' => boolean true
 +
  'self_publish_begin' => null
 +
  'self_publish_end' => null
 +
  'exclude_search' => boolean false
 +
  'created_date' => string '2018-10-16 23:30:26' (length=19)
 +
  'modified_date' => string '2018-10-16 23:30:26' (length=19)
 +
  'site_root' => boolean false
 +
  'deleted_date' => null
 +
  'deleted' => boolean false
 +
  'exclude_menu' => boolean false
 +
  'blank_link' => boolean false
 +
  'created' => string '2016-07-31 16:46:32' (length=19)
 +
  'modified' => string '2018-10-24 23:59:26' (length=19)
 
</syntaxhighlight>
 
</syntaxhighlight>
  

2018年10月25日 (木) 00:07時点における版

[このコンテンツは内容調整中です]

説明

現在のコンテンツ情報を取得する

使い方

<?php $this->BcBaser->getCurrentContent(); ?>

パラメータ

戻り値

(mixed)null

用例

基本

現在のコンテンツ情報を取得する。

コード

<?php var_dump($this->BcBaser->getCurrentContent()); ?>

出力

array (size=34)
  'id' => string '11' (length=2)
  'name' => string 'service1' (length=8)
  'plugin' => string 'Core' (length=4)
  'type' => string 'Page' (length=4)
  'entity_id' => string '3' (length=1)
  'url' => string '/service/service1' (length=17)
  'site_id' => string '0' (length=1)
  'alias_id' => null
  'main_site_content_id' => null
  'parent_id' => string '6' (length=1)
  'lft' => string '35' (length=2)
  'rght' => string '36' (length=2)
  'level' => string '2' (length=1)
  'title' => string 'サービス1' (length=15)
  'description' => string '' (length=0)
  'eyecatch' => string '' (length=0)
  'author_id' => string '1' (length=1)
  'layout_template' => string '' (length=0)
  'status' => boolean true
  'publish_begin' => null
  'publish_end' => null
  'self_status' => boolean true
  'self_publish_begin' => null
  'self_publish_end' => null
  'exclude_search' => boolean false
  'created_date' => string '2018-10-16 23:30:26' (length=19)
  'modified_date' => string '2018-10-16 23:30:26' (length=19)
  'site_root' => boolean false
  'deleted_date' => null
  'deleted' => boolean false
  'exclude_menu' => boolean false
  'blank_link' => boolean false
  'created' => string '2016-07-31 16:46:32' (length=19)
  'modified' => string '2018-10-24 23:59:26' (length=19)

応用

コード

 

出力

 

変更履歴

ソースファイル

関連資料

類似の関数