本文整理匯總了PHP中Breadcrumbs::getCrumbs方法的典型用法代碼示例。如果您正苦於以下問題:PHP Breadcrumbs::getCrumbs方法的具體用法?PHP Breadcrumbs::getCrumbs怎麽用?PHP Breadcrumbs::getCrumbs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Breadcrumbs
的用法示例。
在下文中一共展示了Breadcrumbs::getCrumbs方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: actionShow
public function actionShow()
{
$id = $_GET['id'];
$auth = Auth::checkAuth();
if ($auth) {
$user = Users::findOneByPK($auth);
$user->getProfile();
}
$courses = Courses::findAllByColumn('parent_id', $id);
$view = new View();
$view->user = $user;
$view->courses = $courses;
// $view->user_login = $user->user_login;
// $view->user_group = $user->user_group;
$parent_course = Courses::findOneByPK($id);
$crumbs = Breadcrumbs::getCrumbs($parent_course);
$view->crumbs = $crumbs;
$view->page_title = $parent_course->name;
$view->display('header.php');
if (isset($id)) {
$view->display('courses/child-list.php');
} else {
$view->display('courses/list.php');
}
$view->display('footer.php');
}
示例2: actionLesson
public function actionLesson()
{
$auth = Auth::checkAuth();
if ($auth) {
$user = Users::findOneByPK($auth);
$user->getProfile();
}
$lesson_id = $_GET['lesson_id'];
$view = new View();
// $view->user_login = $user->user_login;
// $view->user_group = $user->user_group;
if (isset($lesson_id)) {
$lesson = Lessons::findOneByPK($lesson_id);
$crumbs = Breadcrumbs::getCrumbs($lesson);
$view->page_title = $lesson->name;
$view->crumbs = $crumbs;
$view->user = $user;
$view->display('header.php');
$view->display('lessons/lesson.php');
$view->display('footer.php');
} else {
throw new ControllerException('Сожалеем, такого урока не существует', '404');
}
}