本文整理汇总了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'));
}
}