本文整理汇总了PHP中ElggObject::removePrivateSetting方法的典型用法代码示例。如果您正苦于以下问题:PHP ElggObject::removePrivateSetting方法的具体用法?PHP ElggObject::removePrivateSetting怎么用?PHP ElggObject::removePrivateSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ElggObject
的用法示例。
在下文中一共展示了ElggObject::removePrivateSetting方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
if ($new_page) {
// new pages can't expire directly
if (strtotime($expiration_date) < time()) {
register_error(elgg_echo("pages_tools:actions:edit:error:expiration_date"));
}
} else {
if (strtotime($expiration_date) < time()) {
$page->unpublished = true;
}
}
}
// save the page
if ($page->save()) {
elgg_clear_sticky_form("page");
// unset edit notice
$page->removePrivateSetting("edit_notice");
// Now save description as an annotation
$page->annotate("page", $page->description, $page->access_id);
system_message(elgg_echo("pages:saved"));
if ($new_page && !$page->unpublished) {
elgg_create_river_item(array('view' => 'river/object/page/create', 'action_type' => 'create', 'subject_guid' => $user->getGUID(), 'object_guid' => $page->getGUID()));
} elseif ($page->getOwnerGUID() != $user->getGUID()) {
// not the owner edited the page, notify the owner
$subject = elgg_echo("pages_tools:notify:edit:subject", array($page->title));
$msg = elgg_echo("pages_tools:notify:edit:message", array($page->title, $user->name, $page->getURL()));
$params = array('action' => 'edit', 'object' => $page);
notify_user($page->getOwnerGUID(), $user->getGUID(), $subject, $msg, $params);
}
forward($page->getURL());
} else {
register_error(elgg_echo("pages:error:no_save"));