本文整理匯總了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());
}
示例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;
}
}
示例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));
}