當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。