BlogHelper::getCategoryList PHP Method

getCategoryList() public method

カテゴリーの一覧をリストタグで取得する
public getCategoryList ( array $categories, integer $depth = 3, boolean $count = false, array $options = [] ) : string
$categories array カテゴリ一覧データ
$depth integer 階層(初期値 : 3)
$count boolean 件数を表示するかどうか(初期値 : false)
$options array オプション(初期値 : array()) - `link` : リンクをつけるかどうか(初期値 : true) ※ その他のオプションは、`link`オプションが`true`の場合に 生成されるa要素の属性設定となる。(HtmlHelper::link() を参照)
return string HTMLのカテゴリ一覧
    public function getCategoryList($categories, $depth = 3, $count = false, $options = array())
    {
        return $this->_getCategoryList($categories, $depth, 1, $count, $options);
    }

Usage Example

    ?>
</h2>
<?php 
}
if ($by_year) {
    ?>
	<ul>
	<?php 
    foreach ($categories as $key => $category) {
        ?>
		<li class="category-year"><span><?php 
        $bcBaser->link($key . '年', array('plugin' => null, 'controller' => $blogContent['BlogContent']['name'], 'action' => 'archives', 'date', $key));
        ?>
</span>
		<?php 
        echo $blog->getCategoryList($category, $depth, $view_count, array('named' => array('year' => $key)));
        ?>
		</li>
	<?php 
    }
    ?>
	</ul>
<?php 
} else {
    ?>
	<?php 
    echo $blog->getCategoryList($categories, $depth, $view_count);
}
?>
</div>