当前位置: 首页>>代码示例>>PHP>>正文


PHP WCF::getBreadcrumbs方法代码示例

本文整理汇总了PHP中wcf\system\WCF::getBreadcrumbs方法的典型用法代码示例。如果您正苦于以下问题:PHP WCF::getBreadcrumbs方法的具体用法?PHP WCF::getBreadcrumbs怎么用?PHP WCF::getBreadcrumbs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wcf\system\WCF的用法示例。


在下文中一共展示了WCF::getBreadcrumbs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: readData

 public function readData()
 {
     parent::readData();
     $this->news = new News($this->newsID);
     if (WCF::getSession()->getPermission('user.cms.news.canStartPoll') && MODULE_POLL) {
         PollManager::getInstance()->setObject('de.codequake.cms.news', $this->news->newsID, $this->news->pollID);
     }
     $time = $this->news->time;
     $dateTime = DateUtil::getDateTimeByTimestamp($time);
     $dateTime->setTimezone(WCF::getUser()->getTimeZone());
     $this->time = $dateTime->format('c');
     $this->subject = $this->news->subject;
     $this->teaser = $this->news->teaser;
     $this->text = $this->news->message;
     $this->enableBBCodes = $this->news->enableBBCodes;
     $this->enableHtml = $this->news->enableHtml;
     $this->enableSmilies = $this->news->enableSmilies;
     $this->imageID = $this->news->imageID;
     WCF::getBreadcrumbs()->add(new Breadcrumb($this->news->subject, LinkHandler::getInstance()->getLink('News', array('application' => 'cms', 'object' => $this->news))));
     foreach ($this->news->getCategories() as $category) {
         $this->categoryIDs[] = $category->categoryID;
     }
     // tagging
     if (MODULE_TAGGING) {
         $tags = $this->news->getTags();
         foreach ($tags as $tag) {
             $this->tags[] = $tag->name;
         }
     }
 }
开发者ID:jacboy,项目名称:Fireball_News,代码行数:30,代码来源:NewsEditForm.class.php

示例2: readData

 public function readData()
 {
     parent::readData();
     WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('cms.page.news'), LinkHandler::getInstance()->getLink('NewsCategoryList', array('application' => 'cms'))));
     $excludedCategoryIDs = array_diff(NewsCategory::getAccessibleCategoryIDs(), NewsCategory::getAccessibleCategoryIDs(array('canAddNews')));
     $categoryTree = new NewsCategoryNodeTree('de.codequake.cms.category.news', 0, false, $excludedCategoryIDs);
     $this->categoryList = $categoryTree->getIterator();
     $this->categoryList->setMaxDepth(0);
     if (empty($_POST)) {
         $dateTime = DateUtil::getDateTimeByTimestamp(TIME_NOW);
         $dateTime->setTimezone(WCF::getUser()->getTimeZone());
         $this->time = $dateTime->format('c');
     } else {
         $dateTime = DateUtil::getDateTimeByTimestamp(@strtotime($this->time));
         $dateTime->setTimezone(WCF::getUser()->getTimeZone());
         $this->time = $dateTime->format('c');
     }
     // default values
     if (empty($_POST)) {
         $this->username = WCF::getSession()->getVar('username');
         // multilingualism
         if (!empty($this->availableContentLanguages)) {
             if ($this->languageID) {
                 $language = LanguageFactory::getInstance()->getUserLanguage();
                 $this->languageID = $language->languageID;
             }
             if (!isset($this->availableContentLanguages[$this->languageID])) {
                 $languageIDs = array_keys($this->availableContentLanguages);
                 $this->languageID = array_shift($languageIDs);
             }
         }
     }
 }
开发者ID:jacboy,项目名称:Fireball_News,代码行数:33,代码来源:NewsAddForm.class.php

示例3: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // add breadcrumbs
     if (MODULE_MEMBERS_LIST) {
         WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.user.members'), LinkHandler::getInstance()->getLink('MembersList')));
     }
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:11,代码来源:TeamPage.class.php

示例4: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // remove default breadcrumb entry
     if (PageMenu::getInstance()->getLandingPage()->menuItem == 'wcf.user.dashboard') {
         WCF::getBreadcrumbs()->remove(0);
     }
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:11,代码来源:DashboardPage.class.php

示例5: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     $this->eventList = new ViewableUserActivityEventList();
     $this->eventList->readObjects();
     // add breadcrumbs
     if (MODULE_MEMBERS_LIST) {
         WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.user.members'), LinkHandler::getInstance()->getLink('MembersList')));
     }
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:13,代码来源:RecentActivityListPage.class.php

示例6: readData

 public function readData()
 {
     parent::readData();
     VisitCountHandler::getInstance()->count();
     WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('cms.page.news'), LinkHandler::getInstance()->getLink('NewsCategoryList', array('application' => 'cms'))));
     // get categories
     $categoryTree = new NewsCategoryNodeTree('de.codequake.cms.category.news');
     $this->categoryList = $categoryTree->getIterator();
     $this->categoryList->setMaxDepth(0);
 }
开发者ID:jacboy,项目名称:Fireball_News,代码行数:10,代码来源:NewsListPage.class.php

示例7: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // remove default breadcrumb entry and set current page as 'website'
     if (PageMenu::getInstance()->getLandingPage()->menuItem == 'ict.header.menu.tracker') {
         WCF::getBreadcrumbs()->remove(0);
         MetaTagHandler::getInstance()->addTag('og:url', 'og:url', LinkHandler::getInstance()->getLink('ProjectList', array('application' => 'ict')), true);
         MetaTagHandler::getInstance()->addTag('og:type', 'og:type', 'website', true);
         MetaTagHandler::getInstance()->addTag('og:title', 'og:title', WCF::getLanguage()->get(PAGE_TITLE), true);
         MetaTagHandler::getInstance()->addTag('og:description', 'og:description', WCF::getLanguage()->get(PAGE_DESCRIPTION), true);
     }
 }
开发者ID:RouL,项目名称:Icy-Tracker,代码行数:15,代码来源:ProjectListPage.class.php

示例8: setBreadcrumbs

 /**
  * Sets breadcrumbs for the given page.
  * 
  * @param	\cms\data\page\Page	$page
  */
 public static function setBreadcrumbs(Page $page)
 {
     if (PageMenu::getInstance()->getLandingPage()->getProcessor() instanceof CMSPageMenuItemProvider) {
         $pageID = PageMenu::getInstance()->getLandingPage()->getProcessor()->getPage()->pageID;
     }
     if (isset($pageID) && $pageID == $page->pageID) {
         WCF::getBreadcrumbs()->remove(0);
     }
     // add breadcrumbs
     foreach ($page->getParentPages() as $child) {
         WCF::getBreadcrumbs()->add($child->getBreadcrumb());
     }
 }
开发者ID:knzo,项目名称:Fireball,代码行数:18,代码来源:CMSCore.class.php

示例9: readData

 public function readData()
 {
     parent::readData();
     $categoryTree = new NewsCategoryNodeTree('de.codequake.cms.category.news');
     $this->categoryList = $categoryTree->getIterator();
     $this->categoryList->setMaxDepth(0);
     if (PageMenu::getInstance()->getLandingPage()->menuItem == 'cms.page.news') {
         WCF::getBreadcrumbs()->remove(0);
         MetaTagHandler::getInstance()->addTag('og:url', 'og:url', LinkHandler::getInstance()->getLink('NewsList', array('application' => 'cms')), true);
         MetaTagHandler::getInstance()->addTag('og:type', 'og:type', 'website', true);
         MetaTagHandler::getInstance()->addTag('og:title', 'og:title', WCF::getLanguage()->get(PAGE_TITLE), true);
         MetaTagHandler::getInstance()->addTag('og:description', 'og:description', WCF::getLanguage()->get(PAGE_DESCRIPTION), true);
         MetaTagHandler::getInstance()->addTag('generator', 'generator', 'Fireball CMS');
     }
 }
开发者ID:jacboy,项目名称:Fireball_News,代码行数:15,代码来源:NewsCategoryListPage.class.php

示例10: readData

 public function readData()
 {
     parent::readData();
     VisitCountHandler::getInstance()->count();
     WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('cms.page.news'), LinkHandler::getInstance()->getLink('NewsCategoryList', array('application' => 'cms'))));
     $this->commentObjectTypeID = CommentHandler::getInstance()->getObjectTypeID('de.codequake.cms.news.comment');
     $this->commentManager = CommentHandler::getInstance()->getObjectType($this->commentObjectTypeID)->getProcessor();
     $this->commentList = CommentHandler::getInstance()->getCommentList($this->commentManager, $this->commentObjectTypeID, $this->newsID);
     $newsEditor = new NewsEditor($this->news->getDecoratedObject());
     $newsEditor->update(array('clicks' => $this->news->clicks + 1));
     // get Tags
     if (MODULE_TAGGING) {
         $this->tags = $this->news->getTags();
     }
     if ($this->news->teaser != '') {
         MetaTagHandler::getInstance()->addTag('description', 'description', $this->news->teaser);
     } else {
         MetaTagHandler::getInstance()->addTag('description', 'description', StringUtil::decodeHTML(StringUtil::stripHTML($this->news->getExcerpt())));
     }
     if (!empty($this->tags)) {
         MetaTagHandler::getInstance()->addTag('keywords', 'keywords', implode(',', $this->tags));
     }
     MetaTagHandler::getInstance()->addTag('og:title', 'og:title', $this->news->subject . ' - ' . WCF::getLanguage()->get(PAGE_TITLE), true);
     MetaTagHandler::getInstance()->addTag('og:url', 'og:url', LinkHandler::getInstance()->getLink('News', array('application' => 'cms', 'object' => $this->news->getDecoratedObject())), true);
     MetaTagHandler::getInstance()->addTag('og:type', 'og:type', 'article', true);
     if ($this->news->getImage() != null) {
         MetaTagHandler::getInstance()->addTag('og:image', 'og:image', $this->news->getImage()->getLink(), true);
     }
     if ($this->news->getUserProfile()->facebook != '') {
         MetaTagHandler::getInstance()->addTag('article:author', 'article:author', 'https://facebook.com/' . $this->news->getUserProfile()->facebook, true);
     }
     if (FACEBOOK_PUBLIC_KEY != '') {
         MetaTagHandler::getInstance()->addTag('fb:app_id', 'fb:app_id', FACEBOOK_PUBLIC_KEY, true);
     }
     MetaTagHandler::getInstance()->addTag('og:description', 'og:description', StringUtil::decodeHTML(StringUtil::stripHTML($this->news->getExcerpt())), true);
     if ($this->news->isNew()) {
         $newsAction = new NewsAction(array($this->news->getDecoratedObject()), 'markAsRead', array('viewableNews' => $this->news));
         $newsAction->executeAction();
     }
     // fetch likes
     if (MODULE_LIKE) {
         $objectType = LikeHandler::getInstance()->getObjectType('de.codequake.cms.likeableNews');
         LikeHandler::getInstance()->loadLikeObjects($objectType, array($this->newsID));
         $this->likeData = LikeHandler::getInstance()->getLikeObjects($objectType);
     }
 }
开发者ID:jacboy,项目名称:Fireball_News,代码行数:46,代码来源:NewsPage.class.php

示例11: setBreadcrumbs

 /**
  * Sets the breadcrumbs.
  * 
  * @param	\news\data\category\NewsCategory	$category
  * @param	\news\data\news\News			$news
  */
 public function setBreadcrumbs(array $parentCategories = array(), NewsCategory $category = null, News $news = null)
 {
     if (PageMenu::getInstance()->getLandingPage()->menuItem != 'news.header.menu.news') {
         WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('news.header.menu.news'), LinkHandler::getInstance()->getLink('NewsOverview', array('application' => 'news'))));
     }
     foreach ($parentCategories as $parentCategory) {
         WCF::getBreadcrumbs()->add($parentCategory->getBreadcrumb());
     }
     if ($category !== null) {
         WCF::getBreadcrumbs()->add($category->getBreadcrumb());
     }
     if ($news !== null) {
         if ($news->isArchived) {
             WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('news.header.menu.news.archive'), LinkHandler::getInstance()->getLink('NewsArchive', array('application' => 'news'))));
         }
         WCF::getBreadcrumbs()->add($news->getBreadcrumb());
     }
 }
开发者ID:joshuaruesweg,项目名称:de.voolia.news,代码行数:24,代码来源:NEWSCore.class.php

示例12: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     if ($this->filter != '') {
         // add breadcrumbs
         WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.conversation.conversations'), LinkHandler::getInstance()->getLink('ConversationList')));
     }
     // read stats
     if (!$this->labelID) {
         switch ($this->filter) {
             case '':
                 $this->conversationCount = $this->items;
                 break;
             case 'draft':
                 $this->draftCount = $this->items;
                 break;
             case 'hidden':
                 $this->hiddenCount = $this->items;
                 break;
             case 'outbox':
                 $this->outboxCount = $this->items;
                 break;
         }
     }
     if ($this->filter != '' || $this->labelID) {
         $conversationList = new UserConversationList(WCF::getUser()->userID, '');
         $this->conversationCount = $conversationList->countObjects();
     }
     if ($this->filter != 'draft' || $this->labelID) {
         $conversationList = new UserConversationList(WCF::getUser()->userID, 'draft');
         $this->draftCount = $conversationList->countObjects();
     }
     if ($this->filter != 'hidden' || $this->labelID) {
         $conversationList = new UserConversationList(WCF::getUser()->userID, 'hidden');
         $this->hiddenCount = $conversationList->countObjects();
     }
     if ($this->filter != 'outbox' || $this->labelID) {
         $conversationList = new UserConversationList(WCF::getUser()->userID, 'outbox');
         $this->outboxCount = $conversationList->countObjects();
     }
 }
开发者ID:wouka,项目名称:com.woltlab.wcf.conversation,代码行数:44,代码来源:ConversationListPage.class.php

示例13: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // cache message data
     $this->cacheMessageData();
     // get messages
     $this->readMessages();
     // set active menu item
     if (isset($this->searchData['selectedObjectTypes']) && count($this->searchData['selectedObjectTypes']) == 1) {
         $objectType = SearchEngine::getInstance()->getObjectType(reset($this->searchData['selectedObjectTypes']));
         if ($activeMenuItem = $objectType->getActiveMenuItem()) {
             PageMenu::getInstance()->setActiveMenuItem($activeMenuItem);
         }
     }
     // add breadcrumbs
     WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.search.title'), LinkHandler::getInstance()->getLink('Search')));
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:20,代码来源:SearchResultPage.class.php

示例14: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     if (!count($_POST)) {
         $this->subject = $this->entry->subject;
         $this->text = $this->entry->message;
         $this->languageID = $this->entry->languageID;
         $this->tags = $this->entry->tags;
         $this->enableBBCodes = $this->entry->enableBBCodes;
         $this->enableHtml = $this->entry->enableHtml;
         $this->enableSmilies = $this->entry->enableSmilies;
         $this->isFeatured = $this->entry->isFeatured;
         if (!$this->entry->isPublished) {
             $this->enableDelayedPublication = 1;
             $dateTime = DateUtil::getDateTimeByTimestamp($this->entry->publicationDate);
             $dateTime->setTimezone(WCF::getUser()->getTimeZone());
             $this->publicationDate = $dateTime->format('c');
         }
         foreach ($this->entry->getCategories() as $category) {
             $this->categoryIDs[] = $category->categoryID;
         }
         // tagging
         if (MODULE_TAGGING) {
             $tags = TagEngine::getInstance()->getObjectTags('de.incendium.cms.news.entry', $this->entry->entryID, array($this->entry->languageID));
             foreach ($tags as $tag) {
                 $this->tags[] = $tag->name;
             }
         }
     }
     // add breadcrumbs
     if ($this->entry->isArchived) {
         WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('cms.header.menu.news.archive'), LinkHandler::getInstance()->getLink('NewsArchive', array('application' => 'cms'))));
     }
     WCF::getBreadcrumbs()->add($this->entry->getBreadcrumb());
 }
开发者ID:Griborim,项目名称:de.incendium.cms.news,代码行数:38,代码来源:NewsEntryEditForm.class.php

示例15: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     if (!count($_POST)) {
         $this->subject = $this->news->subject;
         $this->text = $this->news->text;
         $this->teaser = $this->news->teaser;
         $this->languageID = $this->news->languageID;
         $this->pictureID = $this->news->pictureID;
         $this->tags = $this->news->tags;
         $this->enableBBCodes = $this->news->enableBBCodes;
         $this->enableHtml = $this->news->enableHtml;
         $this->enableSmilies = $this->news->enableSmilies;
         $this->editReason = $this->news->editReason;
         $this->editNoteSuppress = $this->news->editNoteSuppress;
         $this->isHot = $this->news->isHot;
         if (!$this->news->isPublished) {
             $this->enableDelayedPublication = 1;
             $dateTime = DateUtil::getDateTimeByTimestamp($this->news->publicationDate);
             $dateTime->setTimezone(WCF::getUser()->getTimeZone());
             $this->publicationDate = $dateTime->format('c');
         }
         if ($this->news->archivingDate) {
             $this->enableAutomaticArchiving = 1;
             $dateTime = DateUtil::getDateTimeByTimestamp($this->news->archivingDate);
             $dateTime->setTimezone(WCF::getUser()->getTimeZone());
             $this->archivingDate = $dateTime->format('c');
         }
         foreach ($this->news->getCategories() as $category) {
             $this->categoryIDs[] = $category->categoryID;
         }
         // tagging
         if (MODULE_TAGGING) {
             $tags = TagEngine::getInstance()->getObjectTags('de.voolia.news.entry', $this->news->newsID, array($this->news->languageID));
             foreach ($tags as $tag) {
                 $this->tags[] = $tag->name;
             }
         }
         // load sources
         if (NEWS_ENTRY_ENABLE_SOURCES) {
             foreach ($this->news->getSources() as $source) {
                 $this->sources[] = array('sourceText' => $source->sourceText, 'sourceLink' => $source->sourceLink);
             }
         }
     }
     // get news picture
     if ($this->pictureID) {
         $this->picture = new NewsPicture($this->pictureID);
     }
     // add breadcrumbs
     WCF::getBreadcrumbs()->add($this->news->getBreadcrumb());
 }
开发者ID:joshuaruesweg,项目名称:de.voolia.news,代码行数:55,代码来源:NewsEditForm.class.php


注:本文中的wcf\system\WCF::getBreadcrumbs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。