本文整理汇总了PHP中SugarFeed::mark_deleted方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarFeed::mark_deleted方法的具体用法?PHP SugarFeed::mark_deleted怎么用?PHP SugarFeed::mark_deleted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SugarFeed
的用法示例。
在下文中一共展示了SugarFeed::mark_deleted方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteUserFeed
function deleteUserFeed()
{
if (!empty($_REQUEST['record'])) {
$feed = new SugarFeed();
$feed->retrieve($_REQUEST['record']);
if (is_admin($GLOBALS['current_user']) || $feed->created_by == $GLOBALS['current_user']->id) {
$feed->mark_deleted($_REQUEST['record']);
}
}
}
示例2: testpushFeed
public function testpushFeed()
{
SugarFeed::pushFeed('some text', 'SugarFeed', 1, 1, 'Link', 'some url');
//retrieve newly created bean
$sugarFeed = new SugarFeed();
$result = $sugarFeed->retrieve_by_string_fields(array('related_id' => '1', 'related_module' => 'SugarFeed'));
//test for record ID to verify that record is saved
$this->assertTrue(isset($sugarFeed->id));
$this->assertEquals(36, strlen($sugarFeed->id));
//test fetchReplies method
$this->fetchReplies();
//mark the record as deleted
$sugarFeed->mark_deleted($sugarFeed->id);
}