removeFeedForNode() public static method

Removes a RSS/ATOM Feed export for a node
Since: 4.3
public static removeFeedForNode ( integer $nodeID )
$nodeID integer Node ID
Beispiel #1
0
     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');
     foreach ($customActions as $customActionName => $customActionUrl) {
         if ($http->hasPostVariable($customActionName)) {
             if (strpos($customActionUrl, '/') !== false) {
                 list($customActionModuleName, $customActionViewName) = explode('/', $customActionUrl);
                 $customActionModule = eZModule::exists($customActionModuleName);
                 if (!$customActionModule instanceof eZModule) {