本文整理汇总了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');
}
示例2: deletePost
/**
* 删除post
* @param unknown_type $post
*/
public function deletePost($post)
{
return $post->delete();
}
示例3: removeItem
/**
* 删除Item
* @param unknown_type $item
*/
public function removeItem(&$item)
{
$item->delete();
}
示例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')));
}
示例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'));
}
}
}