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


PHP eZContentOperationCollection::deleteObject方法代码示例

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


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

示例1: array

if ($http->hasPostVariable('SupportsMoveToTrash')) {
    if ($http->hasPostVariable('MoveToTrash')) {
        $moveToTrash = $http->postVariable('MoveToTrash') ? true : false;
    } else {
        $moveToTrash = false;
    }
}
$hideRemoveConfirm = $contentINI->hasVariable('RemoveSettings', 'HideRemoveConfirmation') ? $contentINI->variable('RemoveSettings', 'HideRemoveConfirmation') == 'true' ? true : false : false;
if ($http->hasSessionVariable('HideRemoveConfirmation')) {
    $hideRemoveConfirm = $http->sessionVariable('HideRemoveConfirmation');
}
if ($http->hasPostVariable("ConfirmButton") or $hideRemoveConfirm) {
    if (eZOperationHandler::operationIsAvailable('content_delete')) {
        $operationResult = eZOperationHandler::execute('content', 'delete', array('node_id_list' => $deleteIDArray, 'move_to_trash' => $moveToTrash), null, true);
    } else {
        eZContentOperationCollection::deleteObject($deleteIDArray, $moveToTrash);
    }
    if ($http->hasSessionVariable('RedirectURIAfterRemove') && $http->sessionVariable('RedirectURIAfterRemove')) {
        $Module->redirectTo($http->sessionVariable('RedirectURIAfterRemove'));
        $http->removeSessionVariable('RedirectURIAfterRemove');
        return $http->removeSessionVariable('RedirectIfCancel');
    } else {
        return $Module->redirectToView('view', array($viewMode, $contentNodeID, $contentLanguage));
    }
}
$showCheck = $contentINI->hasVariable('RemoveSettings', 'ShowRemoveToTrashCheck') ? $contentINI->variable('RemoveSettings', 'ShowRemoveToTrashCheck') == 'false' ? false : true : true;
$info = eZContentObjectTreeNode::subtreeRemovalInformation($deleteIDArray);
$deleteResult = $info['delete_list'];
$moveToTrashAllowed = $info['move_to_trash'];
$totalChildCount = $info['total_child_count'];
$hasPendingObject = $info['has_pending_object'];
开发者ID:legende91,项目名称:ez,代码行数:31,代码来源:removeobject.php

示例2: testRemovePendingSearchNotAllNodesRemoved

    /**
     * Same test as {@link self::testRemovePendingSearchSeveralNodesForObject()}, with not all nodes removed
     * Use case
     * --------
     * 1. If all nodes are removed, pending action must also be removed
     * 2. If NOT all nodes are removed (at least one node remaining for object), pending action must NOT be removed (case tested here)
     *
     * @group issue_17932
     */
    public function testRemovePendingSearchNotAllNodesRemoved()
    {
        $this->folder->addNode( 43 );
        $folderObjectID = $this->folder->object->attribute( 'id' );

        $aNodeID = array( $this->folder->nodes[0]->attribute( 'node_id' ) ); // Only delete the first node

        eZContentOperationCollection::deleteObject( $aNodeID );
        $filterConds = array(
            'action'        => 'index_object',
            'param'         => $folderObjectID
        );
        $pendingCount = eZPersistentObject::count( eZPendingActions::definition(), $filterConds );
        self::assertGreaterThan( 0, $pendingCount, "eZContentOperationCollection::deleteObject() must remove pending action for object #$folderObjectID as all nodes have been removed" );
    }
开发者ID:robinmuilwijk,项目名称:ezpublish,代码行数:24,代码来源:ezcontentoperationdelete_regression.php

示例3: doRemove

 /**
  * Does the remove job.
  * Will use content_delete operation if available (workflow support)
  * @param array $aNodeID
  * @param bool $moveToTrash Indicates if we move content to trash or not. True by default
  * @internal
  */
 private function doRemove(array $aNodeID, $moveToTrash = true)
 {
     if (eZOperationHandler::operationIsAvailable('content_delete')) {
         $operationResult = eZOperationHandler::execute('content', 'delete', array('node_id_list' => $aNodeID, 'move_to_trash' => $moveToTrash), null, true);
     } else {
         eZContentOperationCollection::deleteObject($aNodeID, $moveToTrash);
     }
 }
开发者ID:nicolasaguenot,项目名称:sqliimport,代码行数:15,代码来源:sqlicontent.php

示例4: json_encode

<?php

$return = false;
$objectId = (int) $_REQUEST['contentobjectid'];
if ($objectId) {
    $eZObj = eZContentObject::fetch($objectId);
    if ($eZObj && $eZObj->attribute('can_remove') && $eZObj->attribute('status') != eZContentObject::STATUS_ARCHIVED) {
        $result = eZContentOperationCollection::deleteObject(array($eZObj->attribute('main_node_id')), true);
        $return = $result['status'];
    }
}
header('Content-Type: application/json');
echo json_encode($return);
eZExecution::cleanExit();
开发者ID:pkamps,项目名称:mugo_bootstrap_admin,代码行数:14,代码来源:remove_object.php


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