本文整理匯總了PHP中eZContentOperationCollection::createFeedForNode方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZContentOperationCollection::createFeedForNode方法的具體用法?PHP eZContentOperationCollection::createFeedForNode怎麽用?PHP eZContentOperationCollection::createFeedForNode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZContentOperationCollection
的用法示例。
在下文中一共展示了eZContentOperationCollection::createFeedForNode方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$user = eZUser::currentUser();
$hasAccess = $user->hasAccessTo('rss', 'edit');
if ($hasAccess['accessWord'] === 'no') {
return $module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel');
}
// Then make sure we have node id parameter
if (!$http->hasPostVariable('NodeID')) {
eZDebug::writeError('Create/ Remove NodeFeed: missing node ID parameter.', 'content-action-handler');
return $module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
}
$nodeID = $http->postVariable('NodeID');
if ($http->hasPostVariable('CreateNodeFeed')) {
if (eZOperationHandler::operationIsAvailable('content_createnodefeed')) {
$operationResult = eZOperationHandler::execute('content', 'createnodefeed', array('node_id' => $nodeID), null, true);
} else {
$operationResult = eZContentOperationCollection::createFeedForNode($nodeID);
}
} else {
if (eZOperationHandler::operationIsAvailable('content_removenodefeed')) {
$operationResult = eZOperationHandler::execute('content', 'removenodefeed', array('node_id' => $nodeID), null, true);
} else {
$operationResult = eZContentOperationCollection::removeFeedForNode($nodeID);
}
}
if (!isset($operationResult['status']) || !$operationResult['status']) {
return $module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel');
}
return $module->redirectToView('view', array('full', $nodeID));
} else {
// Check if there are any custom actions to handle
$customActions = eZINI::instance('datatype.ini')->variable('ViewSettings', 'CustomActionMap');