本文整理汇总了PHP中Breadcrumbs::factory方法的典型用法代码示例。如果您正苦于以下问题:PHP Breadcrumbs::factory方法的具体用法?PHP Breadcrumbs::factory怎么用?PHP Breadcrumbs::factory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Breadcrumbs
的用法示例。
在下文中一共展示了Breadcrumbs::factory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: before
/**
* Loads the template [View] object.
*/
public function before()
{
parent::before();
if ($this->auto_render === TRUE) {
if ($this->request->is_ajax() === TRUE) {
// Load the template
$this->template = View::factory('system/ajax');
} else {
$this->template = View::factory($this->template);
}
// Initialize empty values
$this->template->title = NULL;
$this->template->content = NULL;
$this->breadcrumbs = Breadcrumbs::factory();
$routes = Route::all();
if (isset($routes['backend'])) {
$this->breadcrumbs->add(UI::icon('home'), Route::get('backend')->uri());
}
$this->init_media();
}
}
示例2: breadcrumbs
/**
*
* @param integer $level
* @return array
*/
public function breadcrumbs($level = 0)
{
$crumbs = Breadcrumbs::factory();
if ($this->parent() instanceof Model_Page_Front and $this->level > $level) {
$this->parent()->_recurse_breadcrumbs($level, $crumbs);
}
$crumbs->add($this->breadcrumb(), $this->url, TRUE, NULL, array('id' => $this->id));
return $crumbs;
}