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


PHP unknown_type::delete方法代码示例

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


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

示例1: removeAction

 /**
  * Method to remove records
  * @see application/controllers/ICrudController#removeAction()
  */
 public function removeAction()
 {
     $key = $this->_getParam($this->_model->getFieldKey());
     try {
         $this->_model->delete("{$this->_model->getFieldKey()} = {$key}");
     } catch (Exception $e) {
         Fgsl_Session_Namespace::set('exception', $e);
         $this->_redirect('error/message');
     }
     $this->_redirect($this->getRequest()->getModuleName() . '/' . $this->getRequest()->getControllerName() . '/list');
 }
开发者ID:rogeriopradoj,项目名称:temostudo,代码行数:15,代码来源:Abstract.php

示例2: deletePost

 /**
  * 删除post
  * @param unknown_type $post
  */
 public function deletePost($post)
 {
     return $post->delete();
 }
开发者ID:stan5621,项目名称:jp_edu_online,代码行数:8,代码来源:PostableBehavior.php

示例3: removeItem

 /**
  * 删除Item
  * @param unknown_type $item
  */
 public function removeItem(&$item)
 {
     $item->delete();
 }
开发者ID:stan5621,项目名称:jp_edu_online,代码行数:8,代码来源:AbleBehavior.php

示例4: resolveNotification

 /**
  * View the notification, and clear if requested
  *
  * @param unknown_type $oKTNotification
  */
 function resolveNotification($oKTNotification)
 {
     $notify_action = KTUtil::arrayGet($_REQUEST, 'notify_action', null);
     if ($notify_action == 'clear') {
         $_SESSION['KTInfoMessage'][] = _kt('Cleared notification.');
         $oKTNotification->delete();
         exit(redirect(generateControllerLink('dashboard')));
     }
     // otherwise, we want to redirect the to object represented by the item.
     //  - viewDocument and viewFolder are the appropriate items.
     //  - object_id
     $info = $this->_getSubscriptionData($oKTNotification);
     $object_type = $this->_getEventObjectType($info['event_type']);
     if ($object_type == '') {
         $_SESSION['KTErrorMessage'][] = 'This notification has no "target".  Please report as a bug that this subscription should only have a clear action.' . $object_type;
         exit(redirect(generateControllerLink('dashboard')));
     }
     if ($object_type == 'document') {
         if ($info['object_id'] !== null) {
             // fails and generates an error with no doc-id.
             $params = 'fDocumentId=' . $info['object_id'];
             $url = generateControllerLink('viewDocument', $params);
             //$oKTNotification->delete(); // clear the alert.
             exit(redirect($url));
         }
     } else {
         if ($object_type == 'folder') {
             if ($info['object_id'] !== null) {
                 // fails and generates an error with no doc-id.
                 $params = 'fFolderId=' . $info['object_id'];
                 $url = generateControllerLink('browse', $params);
                 //$oKTNotification->delete(); // clear the alert.
                 exit(redirect($url));
             }
         }
     }
     $_SESSION['KTErrorMessage'][] = sprintf('This notification has no "target".  Please inform the %s developers that there is a target bug with type: ' . $info['event_type'], APP_NAME);
     exit(redirect(generateControllerLink('dashboard')));
 }
开发者ID:jpbauer,项目名称:knowledgetree,代码行数:44,代码来源:Notification.inc.php

示例5: revoke

 /**
  * Revoke
  *
  * @param string $type
  * @param string $arg
  * @return void
  */
 protected function revoke($type, $arg)
 {
     list($aclResourceId, $resourceIds) = $this->splitParams($type, $arg);
     if (isset($this->resourceTypeObjectRelation)) {
         foreach ($resourceIds as $resourceId) {
             if ($resourceId != "*") {
                 $this->resourceTypeObjectRelation->delete($aclResourceId, $resourceId);
             } elseif ($resourceId == "*") {
                 $this->resourceTypeObjectRelation->delete($aclResourceId);
             }
         }
         if ($type == "host" || $type == "hostgroup" || $type == "servicegroup") {
             $field = "all_" . $type . "s";
             $this->object->update($aclResourceId, array($field => '0', 'changed' => '1'));
         }
     }
 }
开发者ID:euidzero,项目名称:centreon-clapi,代码行数:24,代码来源:centreonACLResource.class.php


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