本文整理汇总了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');