本文整理汇总了PHP中eZContentOperationCollection::UpdateMainAssignment方法的典型用法代码示例。如果您正苦于以下问题:PHP eZContentOperationCollection::UpdateMainAssignment方法的具体用法?PHP eZContentOperationCollection::UpdateMainAssignment怎么用?PHP eZContentOperationCollection::UpdateMainAssignment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZContentOperationCollection
的用法示例。
在下文中一共展示了eZContentOperationCollection::UpdateMainAssignment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if ($existingMainNodeID === false or $existingMainNodeID != $mainAssignmentID) {
if ($existingMainNode and !$existingMainNode->checkAccess('edit')) {
return $module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel', array());
}
$newMainNode = eZContentObjectTreeNode::fetch($mainAssignmentID);
if (!$newMainNode) {
return $module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
}
if (!$newMainNode->checkAccess('edit')) {
return $module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel');
}
$mainAssignmentParentID = $newMainNode->attribute('parent_node_id');
if (eZOperationHandler::operationIsAvailable('content_updatemainassignment')) {
$operationResult = eZOperationHandler::execute('content', 'updatemainassignment', array('main_assignment_id' => $mainAssignmentID, 'object_id' => $objectID, 'main_assignment_parent_id' => $mainAssignmentParentID), null, true);
} else {
eZContentOperationCollection::UpdateMainAssignment($mainAssignmentID, $objectID, $newMainNode->attribute('parent_node_id'));
}
}
} else {
eZDebug::writeError("No MainAssignmentID found for action " . $module->currentAction(), 'content/action');
}
return $module->redirectToView('view', array($viewMode, $nodeID, $languageCode));
} else {
if ($module->isCurrentAction('AddAssignment') or $module->isCurrentAction('SelectAssignmentLocation')) {
if (!$module->hasActionParameter('ObjectID')) {
eZDebug::writeError("Missing ObjectID parameter for action " . $module->currentAction(), 'content/action');
return $module->redirectToView('view', array('full', 2));
}
if (!$module->hasActionParameter('NodeID')) {
eZDebug::writeError("Missing NodeID parameter for action " . $module->currentAction(), 'content/action');
return $module->redirectToView('view', array('full', 2));