本文整理汇总了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;