当前位置: 首页>>代码示例>>PHP>>正文


PHP access::delete_item方法代码示例

本文整理汇总了PHP中access::delete_item方法的典型用法代码示例。如果您正苦于以下问题:PHP access::delete_item方法的具体用法?PHP access::delete_item怎么用?PHP access::delete_item使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在access的用法示例。


在下文中一共展示了access::delete_item方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: item_deleted

 static function item_deleted($item)
 {
     access::delete_item($item);
     // Find any other albums that had the deleted item as the album cover and null it out.
     // In some cases this may leave us with a missing album cover up in this item's parent
     // hierarchy, but in most cases it'll work out fine.
     foreach (ORM::factory("item")->where("album_cover_item_id", "=", $item->id)->find_all() as $parent) {
         item::remove_album_cover($parent);
     }
     $parent = $item->parent();
     if (!$parent->album_cover_item_id) {
         // Assume that we deleted the album cover
         if (batch::in_progress()) {
             // Remember that this parent is missing an album cover, for later.
             $batch_missing_album_cover = Session::instance()->get("batch_missing_album_cover", array());
             $batch_missing_album_cover[$parent->id] = 1;
             Session::instance()->set("batch_missing_album_cover", $batch_missing_album_cover);
         } else {
             // Choose the first viewable child as the new cover.
             if ($child = $parent->viewable()->children(1)->current()) {
                 item::make_album_cover($child);
             }
         }
     }
 }
开发者ID:JasonWiki,项目名称:docs,代码行数:25,代码来源:gallery_event.php

示例2: item_before_delete

 static function item_before_delete($item)
 {
     access::delete_item($item);
 }
开发者ID:xafr,项目名称:gallery3,代码行数:4,代码来源:gallery_event.php

示例3: item_deleted

 static function item_deleted($item)
 {
     access::delete_item($item);
 }
开发者ID:andyst,项目名称:gallery3,代码行数:4,代码来源:gallery_event.php


注:本文中的access::delete_item方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。