本文整理匯總了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));