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


PHP eZContentOperationCollection::removeNodes方法代码示例

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


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

示例1: array_keys

             if ($count > 0) {
                 $hasChildren = true;
             }
         }
     }
     if ($hasChildren) {
         $http->setSessionVariable('CurrentViewMode', $viewMode);
         $http->setSessionVariable('DeleteIDArray', array_keys($removeList));
         $http->setSessionVariable('ContentNodeID', $nodeID);
         $http->setSessionVariable('ContentLanguage', $languageCode);
         return $module->redirectToView('removeobject');
     } else {
         if (eZOperationHandler::operationIsAvailable('content_removelocation')) {
             $operationResult = eZOperationHandler::execute('content', 'removelocation', array('node_list' => array_keys($removeList)), null, true);
         } else {
             eZContentOperationCollection::removeNodes(array_keys($removeList));
         }
     }
     return $module->redirectToView('view', array($viewMode, $redirectNodeID, $languageCode));
 } else {
     if ($http->hasPostVariable('EditButton')) {
         if ($http->hasPostVariable('ContentObjectID')) {
             $parameters = array($http->postVariable('ContentObjectID'));
             if ($http->hasPostVariable('ContentObjectVersion')) {
                 $parameters[] = $http->postVariable('ContentObjectVersion');
                 if ($http->hasPostVariable('ContentObjectLanguageCode')) {
                     $parameters[] = $http->postVariable('ContentObjectLanguageCode');
                 }
             } else {
                 if ($http->hasPostVariable('ContentObjectLanguageCode')) {
                     $languageCode = $http->postVariable('ContentObjectLanguageCode');
开发者ID:heliopsis,项目名称:ezpublish-legacy,代码行数:31,代码来源:action.php

示例2: foreach

// to do this the following must be true:
// - The total child count must be zero
// - There must be no object removal (i.e. it is the only node for the object)
if ($totalChildCount == 0) {
    $canRemove = true;
    foreach ($deleteResult as $item) {
        if ($item['object_node_count'] <= 1) {
            $canRemove = false;
            break;
        }
    }
    if ($canRemove) {
        if (eZOperationHandler::operationIsAvailable('content_removelocation')) {
            $operationResult = eZOperationHandler::execute('content', 'removelocation', array('node_list' => array_keys($deleteNodeIdArray), 'move_to_trash' => $moveToTrash), null, true);
        } else {
            eZContentOperationCollection::removeNodes(array_keys($deleteNodeIdArray));
        }
        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));
        }
    }
}
$tpl = eZTemplate::factory();
$tpl->setVariable('reverse_related', $info['reverse_related_count']);
$tpl->setVariable('module', $Module);
$tpl->setVariable('moveToTrashAllowed', $moveToTrashAllowed);
// Backwards compatibility
开发者ID:legende91,项目名称:ez,代码行数:31,代码来源:removeobject.php


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