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


PHP WikiPage::getMetadata方法代码示例

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


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

示例1: wikiPageUpdated

 function wikiPageUpdated()
 {
     $event_manager =& $this->_getEventManager();
     $item_factory =& $this->_getItemFactory();
     $wiki_page_name = $this->request->get('wiki_page');
     $group_id = $this->request->get('group_id');
     $documents = $item_factory->getWikiPageReferencers($wiki_page_name, $group_id);
     $item_dao =& new Docman_ItemDao(CodendiDataAccess::instance());
     $user = $this->request->get('user');
     $diff_link = $this->request->get('diff_link');
     $version = $this->request->get('version');
     foreach ($documents as $document) {
         $wiki_page = new WikiPage($group_id, $wiki_page_name);
         $wiki_metadata = $wiki_page->getMetadata();
         // Update the item's update date attribute.
         $item_dao->updateById($document->getId(), null, null, null, null, null, $update_date = time(), null, null, null, null, null, null);
         $event_manager->processEvent('plugin_docman_event_wikipage_update', array('group_id' => $group_id, 'item' => $document, 'user' => $user, 'url' => $diff_link, 'wiki_page' => $wiki_page_name, 'old_value' => $version, 'new_value' => $version + 1));
     }
     $event_manager->processEvent('send_notifications', array());
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:20,代码来源:Docman_WikiController.class.php

示例2: indexNonexistantDocument

 /**
  * @param Docman_Item $item
  * @throws FullTextSearchDocmanIndexFileTooBigException
  */
 private function indexNonexistantDocument(Docman_Item $item)
 {
     $item_factory = $this->getDocmanItemFactory($item);
     $item_type = $item_factory->getItemTypeForItem($item);
     switch ($item_type) {
         case PLUGIN_DOCMAN_ITEM_TYPE_EMPTY:
             $this->indexNewEmptyDocument($item);
             break;
         case PLUGIN_DOCMAN_ITEM_TYPE_FOLDER:
             $this->indexNewDocmanFolder($item);
             break;
         case PLUGIN_DOCMAN_ITEM_TYPE_WIKI:
             $wiki_page = new WikiPage($item->getGroupId(), $item->getPagename());
             $this->indexNewWikiDocument($item, $wiki_page->getMetadata());
             break;
         case PLUGIN_DOCMAN_ITEM_TYPE_LINK:
             $this->indexNewLinkDocument($item);
             break;
         case PLUGIN_DOCMAN_ITEM_TYPE_EMBEDDEDFILE:
         case PLUGIN_DOCMAN_ITEM_TYPE_FILE:
             $this->indexNewDocument($item, $item->getCurrentVersion());
             break;
         default:
             $this->logger->debug("unrecognized item type, can't index it");
             break;
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:31,代码来源:FullTextSearchDocmanActions.class.php

示例3: getIndexedWikiPageData

 public function getIndexedWikiPageData(WikiPage $wiki_page)
 {
     $wiki_page_metadata = $wiki_page->getMetadata();
     return array('id' => $wiki_page->getId(), 'group_id' => $wiki_page->getGid(), 'page_name' => $wiki_page->getPagename(), 'last_modified_date' => date('c', $wiki_page_metadata[self::PHPWIKI_METADATA_LAST_MODIFIED_DATE]), 'last_author' => $wiki_page_metadata[self::PHPWIKI_METADATA_AUTHOR_ID], 'last_summary' => isset($wiki_page_metadata[self::PHPWIKI_METADATA_SUMMARY]) ? $wiki_page_metadata[self::PHPWIKI_METADATA_SUMMARY] : '', 'content' => isset($wiki_page_metadata[self::PHPWIKI_METADATA_CONTENT]) ? $wiki_page_metadata[self::PHPWIKI_METADATA_CONTENT] : '', 'permissions' => $this->getCurrentPermissions($wiki_page));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:5,代码来源:RequestWikiDataFactory.class.php


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