本文整理汇总了PHP中ElggObject::clearRelationships方法的典型用法代码示例。如果您正苦于以下问题:PHP ElggObject::clearRelationships方法的具体用法?PHP ElggObject::clearRelationships怎么用?PHP ElggObject::clearRelationships使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ElggObject
的用法示例。
在下文中一共展示了ElggObject::clearRelationships方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: forward
$publication->access_id = $access;
$publication->title = $title;
$publication->description = $abstract;
if (!$publication->save()) {
register_error(elgg_echo("publication:error"));
forward($_SERVER['HTTP_REFERER']);
}
if (is_array($tagarray)) {
$publication->tags = $tagarray;
}
$publication->comments_on = $comments_on;
$publication->uri = $uri;
foreach ($CONFIG->publication as $shortname => $valuetype) {
$publication->{$shortname} = $params_value[$shortname];
}
$publication->clearRelationships();
if (is_array($pauthors) && sizeof($pauthors) > 0) {
foreach ($pauthors as $author) {
if (is_int($author)) {
add_entity_relationship($publication->getGUID(), 'author', $author);
}
}
}
$pauthors = implode(',', $pauthors);
$publication->authors = $pauthors;
$publication->attachment = $attachment;
system_message(elgg_echo("publication:posted"));
add_to_river('river/object/publication/create', 'create', $_SESSION['user']->guid, $publication->guid);
remove_metadata($_SESSION['user']->guid, 'publicationtitle');
remove_metadata($_SESSION['user']->guid, 'publicationabstract');
remove_metadata($_SESSION['user']->guid, 'publicationkeywords');