本文整理汇总了PHP中ArtefactTypeComment::delete_view_comments方法的典型用法代码示例。如果您正苦于以下问题:PHP ArtefactTypeComment::delete_view_comments方法的具体用法?PHP ArtefactTypeComment::delete_view_comments怎么用?PHP ArtefactTypeComment::delete_view_comments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArtefactTypeComment
的用法示例。
在下文中一共展示了ArtefactTypeComment::delete_view_comments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
safe_require('artefact', 'comment');
db_begin();
ArtefactTypeComment::delete_view_comments($this->id);
delete_records('view_access', 'view', $this->id);
delete_records('view_autocreate_grouptype', 'view', $this->id);
delete_records('view_tag', 'view', $this->id);
delete_records('view_visit', 'view', $this->id);
delete_records('collection_view', 'view', $this->id);
delete_records('usr_watchlist_view', 'view', $this->id);
if ($blockinstanceids = get_column('block_instance', 'id', 'view', $this->id)) {
require_once get_config('docroot') . 'blocktype/lib.php';
foreach ($blockinstanceids as $id) {
$bi = new BlockInstance($id);
$bi->delete();
}
}
handle_event('deleteview', $this->id);
delete_records('view_rows_columns', 'view', $this->id);
delete_records('view', 'id', $this->id);
if (!empty($this->owner) && $this->is_submitted()) {
// There should be no way to delete a submitted view,
// but unlock its artefacts just in case.
ArtefactType::update_locked($this->owner);
}
require_once 'embeddedimage.php';
EmbeddedImage::delete_embedded_images('description', $this->id);
$this->deleted = true;
db_commit();
}