本文整理匯總了PHP中TabController::getBookmarksTabs方法的典型用法代碼示例。如果您正苦於以下問題:PHP TabController::getBookmarksTabs方法的具體用法?PHP TabController::getBookmarksTabs怎麽用?PHP TabController::getBookmarksTabs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TabController
的用法示例。
在下文中一共展示了TabController::getBookmarksTabs方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: BookmarksViewAction
public function BookmarksViewAction()
{
$v_request = Project::getRequest();
$data = array();
$this->_get_catalogs($data, $v_categoryID);
//$this->_BaseSiteData($data);
$data['action'] = 'BookmarksView';
$v_id = (int) $v_request->getKeyByNumber(0);
if ($v_id > 0) {
$v_bookmarks_model = new BookmarksModel();
$v_bookmarks_model->load($v_id);
$v_bookmarks_model->views++;
$v_bookmarks_model->save();
$data['bookmark_row'] = $v_bookmarks_model->loadBookmarkRow($v_id);
$v_tab_name = $data['bookmark_row']['title'];
$v_encoding = mb_detect_encoding($v_tab_name);
if (mb_strlen($v_tab_name, $v_encoding) > 50) {
$v_tab_name = mb_substr($v_tab_name, 0, 50, $v_encoding) . '...';
}
$data['tab_bookmarks_view'] = $v_tab_name;
// ---
$controller = new BaseCommentController();
$data['comment_list'] = $controller->CommentList($v_id, $v_request->getKeyByNumber(1), 0, 'Bookmarks', 'BookmarksView', 'bookmarks', array($v_id));
$data['add_comment_url'] = $v_request->createUrl('Bookmarks', 'BookmarksCommentAdd');
$data['add_comment_element_id'] = $v_id;
$data['add_comment_id'] = 0;
// ---
$this->_view->assign('tab_list', TabController::getBookmarksTabs(false, false, false, false, false, false, true, $v_tab_name));
// Show tabs
$this->_view->Bookmarks_View($data);
$this->_view->parse();
} else {
Project::getResponse()->redirect($v_request->createUrl('Bookmarks', 'BookmarksList'));
}
}