本文整理匯總了PHP中ElggObject::getUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP ElggObject::getUrl方法的具體用法?PHP ElggObject::getUrl怎麽用?PHP ElggObject::getUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ElggObject
的用法示例。
在下文中一共展示了ElggObject::getUrl方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: forward
// Access ids
$page->access_id = (int) get_input('access_id', ACCESS_PRIVATE);
if (strpos($page->title, 'DF_') == 0 or isadmin() or $container instanceof ElggGroup and $container->name == 'Community Guides') {
$page->description = get_input('description', '', false);
}
$page->slug = get_input('slug', '');
// Write access id
$page->write_access_id = (int) get_input('write_access_id', ACCESS_PRIVATE);
// Set parent
$page->parent_guid = $parent_guid;
// Ensure ultimate owner
$page->owner_guid = $page->owner_guid ? $page->owner_guid : $_SESSION['user']->guid;
// finally save
if ($page->save()) {
// Now save description as an annotation
$page->annotate('page', $page->description, $page->access_id);
system_message(elgg_echo("pages:saved"));
//add to river
add_to_river('river/object/page/create', 'create', $_SESSION['user']->guid, $page->guid);
// Forward to the user's profile
forward($page->getUrl());
exit;
} else {
register_error(elgg_echo('pages:notsaved'));
}
} else {
register_error(elgg_echo("pages:noaccess"));
}
// Forward to the user's profile
forward($page->getUrl());
exit;