本文整理汇总了PHP中WikiPage::getGid方法的典型用法代码示例。如果您正苦于以下问题:PHP WikiPage::getGid方法的具体用法?PHP WikiPage::getGid怎么用?PHP WikiPage::getGid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WikiPage
的用法示例。
在下文中一共展示了WikiPage::getGid方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFromattedUgroupsThatCanReadWikiPage
public function getFromattedUgroupsThatCanReadWikiPage(WikiPage $wiki_page)
{
$project = $this->project_manager->getProject($wiki_page->getGid());
$ugroup_ids = $this->permission_manager->getAuthorizedUgroupIds($wiki_page->getId(), self::WIKI_PERMISSION_READ);
$ugroup_ids = $this->filterWikiPagePermissionsAccordingToService($project, $ugroup_ids);
$ugroup_ids = $this->filterWikiPagePermissionsAccordingToProject($project, $ugroup_ids);
return $this->literalizer->ugroupIdsToString($ugroup_ids, $project);
}
示例2: getFormattedContent
public function getFormattedContent(WikiPage $page)
{
$formatter = new WikiPageVersionContentFormatter($page->getGid());
return $formatter->getFormattedContent($page, $this);
}
示例3: setWikiPagePerms
/**
*
*/
function setWikiPagePerms()
{
global $feedback;
$wp = new WikiPage($_POST['object_id']);
if ($_POST['reset']) {
$ret = $wp->resetPermissions();
} else {
$ret = $wp->setPermissions($_POST['ugroups']);
}
if (!$ret) {
exit_error($GLOBALS['Language']->getText('global', 'error'), $GLOBALS['Language']->getText('wiki_actions_wikiserviceadmin', 'update_page_perm_err', array($feedback)));
}
$event_manager = EventManager::instance();
$event_manager->processEvent("wiki_page_permissions_updated", array('group_id' => $wp->getGid(), 'wiki_page' => $wp->getPagename()));
}
示例4: delete
/**
* Remove an indexed wiki page
*
* @param WikiPage $wiki_page The item to delete
*/
public function delete(WikiPage $wiki_page)
{
$this->logger->debug('[Wiki] ElasticSearch: delete wiki page ' . $wiki_page->getPagename() . ' #' . $wiki_page->getId());
try {
$this->client->getIndexedElement($wiki_page->getGid(), $wiki_page->getId());
$this->client->delete($wiki_page->getGid(), $wiki_page->getId());
} catch (ElasticSearch_ElementNotIndexed $exception) {
$this->logger->debug('[Wiki] ElasticSearch: wiki page ' . $wiki_page->getPagename() . ' #' . $wiki_page->getId() . ' not indexed, nothing to delete');
return;
}
}
示例5: 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));
}