本文整理匯總了PHP中WikiPage::getPagename方法的典型用法代碼示例。如果您正苦於以下問題:PHP WikiPage::getPagename方法的具體用法?PHP WikiPage::getPagename怎麽用?PHP WikiPage::getPagename使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WikiPage
的用法示例。
在下文中一共展示了WikiPage::getPagename方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getTransformedContent
private function getTransformedContent(WikiPage $wiki_page, WikiPageVersion $version, WikiRequest $request)
{
$dbi = $request->_dbi;
$page_db = $dbi->getPage($wiki_page->getPagename());
$revision = $page_db->getRevision($version->getVersionId());
return $revision->getTransformedContent();
}
示例2: urlencode
/**
* _buildPageLink - private
*
* @param WikiPage $wikiPage
* @param string $title
* @return string $href
*/
function _buildPageLink(&$wikiPage, $title = null)
{
$href = '';
// Check permission
if ($wikiPage->isAutorized(user_getid())) {
$pagename = $wikiPage->getPagename();
// Build page link
if (empty($title)) {
$title = $pagename;
}
$link = '/wiki/index.php?group_id=' . $this->gid . '&pagename=' . urlencode($pagename);
// Display title as emphasis if corresponding page does't exist.
if ($wikiPage->isEmpty()) {
$title = '<em>' . $title . '</em>';
$link .= '&action=edit';
}
// Build Lock image if a permission is set on the corresponding page
if ($wikiPage->permissionExist()) {
$permLink = $this->wikiLink . '&view=pagePerms&id=' . $wikiPage->getId();
$title = $title . '<img src="' . util_get_image_theme("ic/lock.png") . '" border="0" alt="Lock" />';
}
$href = '<a href="' . $link . '">' . $title . '</a>';
}
return $href;
}
示例3: WikiPage
/**
* pagePerms - public View
*/
function _pagePerms($postUrl = '')
{
$wp = new WikiPage($_REQUEST['id']);
$pagename = $wp->getPagename();
$eM =& EventManager::instance();
$referenced = false;
$eM->processEvent('isWikiPageReferenced', array('referenced' => &$referenced, 'wiki_page' => $pagename, 'group_id' => $this->gid));
if ($referenced) {
$label = '';
$eM->processEvent('getPermsLabelForWiki', array('label' => &$label));
print '<p align="center"><br><b>' . $label . '</b></p>';
} else {
print $GLOBALS['Language']->getText('wiki_views_wikiviews', 'set_perm_title');
if (empty($pagename)) {
print $GLOBALS['Language']->getText('wiki_views_wikiviews', 'empty_page');
} else {
print $GLOBALS['Language']->getText('wiki_views_wikiviews', 'not_empty_page', array($pagename));
permission_display_selection_form("WIKIPAGE_READ", $wp->getId(), $this->gid, $postUrl);
}
}
}
示例4: updatePermissions
/**
*
* @param WikiPage $wiki_page
*/
public function updatePermissions(WikiPage $wiki_page)
{
$this->logger->debug('[Wiki] ElasticSearch: update permissions of wiki page ' . $wiki_page->getPagename() . ' #' . $wiki_page->getId());
$update_data = array();
$this->request_data_factory->setUpdatedData($update_data, 'permissions', $this->request_data_factory->getCurrentPermissions($wiki_page));
$this->indexOrUpdate($wiki_page->getGid(), $wiki_page->getId(), $update_data);
}
示例5: 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()));
}
示例6: 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));
}