• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP eZContentBrowse类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中eZContentBrowse的典型用法代码示例。如果您正苦于以下问题:PHP eZContentBrowse类的具体用法?PHP eZContentBrowse怎么用?PHP eZContentBrowse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了eZContentBrowse类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: loadObjectList

 function loadObjectList($package, $http, $step, &$persistentData, $tpl, &$module)
 {
     if ($http->hasPostVariable('AddSubtree')) {
         eZContentBrowse::browse(array('action_name' => 'FindLimitationSubtree', 'description_template' => 'design:package/creators/ezcontentobject/browse_subtree.tpl', 'from_page' => '/package/create', 'persistent_data' => array('PackageStep' => $http->postVariable('PackageStep'), 'CreatorItemID' => $http->postVariable('CreatorItemID'), 'CreatorStepID' => $http->postVariable('CreatorStepID'), 'Subtree' => 1)), $module);
     } else {
         if ($http->hasPostVariable('AddNode')) {
             eZContentBrowse::browse(array('action_name' => 'FindLimitationNode', 'description_template' => 'design:package/creators/ezcontentobject/browse_node.tpl', 'from_page' => '/package/create', 'persistent_data' => array('PackageStep' => $http->postVariable('PackageStep'), 'CreatorItemID' => $http->postVariable('CreatorItemID'), 'CreatorStepID' => $http->postVariable('CreatorStepID'), 'Node' => 1)), $module);
         } else {
             if ($http->hasPostVariable('RemoveSelected')) {
                 foreach (array_keys($persistentData['node_list']) as $key) {
                     if (in_array($persistentData['node_list'][$key]['id'], $http->postVariable('DeleteIDArray'))) {
                         unset($persistentData['node_list'][$key]);
                     }
                 }
             } else {
                 if ($http->hasPostVariable('SelectedNodeIDArray') && !$http->hasPostVariable('BrowseCancelButton')) {
                     if ($http->hasPostVariable('Subtree') && $http->hasPostVariable('Subtree') == 1) {
                         foreach ($http->postVariable('SelectedNodeIDArray') as $nodeID) {
                             $persistentData['node_list'][] = array('id' => $nodeID, 'type' => 'subtree');
                         }
                     } else {
                         if ($http->hasPostVariable('Node') && $http->hasPostVariable('Node') == 1) {
                             foreach ($http->postVariable('SelectedNodeIDArray') as $nodeID) {
                                 $persistentData['node_list'][] = array('id' => $nodeID, 'type' => 'node');
                             }
                         }
                     }
                 }
             }
         }
     }
     $tpl->setVariable('node_list', $persistentData['node_list']);
 }
开发者ID:,项目名称:,代码行数:33,代码来源:


示例2: proccessHTTPInput

 public function proccessHTTPInput($module, $http, $edit = false)
 {
     if ($http->hasVariable('DiscardButton')) {
         return $module->redirectTo('csv_import/configs');
     }
     if ($http->hasVariable('BrowseParentNode')) {
         $url = $edit ? 'csv_import/edit_config/' . $this->attribute('id') : 'csv_import/add_config';
         $browseParameters = array('action_name' => 'AddParentNode', 'type' => 'NewObjectAddNodeAssignment', 'from_page' => $url);
         return eZContentBrowse::browse($browseParameters, $module);
     }
     if ($http->hasVariable('SelectedNodeIDArray')) {
         $nodeIDs = (array) $http->variable('SelectedNodeIDArray');
         $this->setAttribute('parent_node_id', (int) $nodeIDs[0]);
     } elseif ($http->hasVariable('parent_node_id')) {
         $this->setAttribute('parent_node_id', (int) $http->variable('parent_node_id'));
     }
     if ($http->hasVariable('name')) {
         $this->setAttribute('name', $http->variable('name'));
     }
     if ($http->hasVariable('class_id')) {
         $this->setAttribute('class_id', $http->variable('class_id'));
     }
     if ($http->hasVariable('attributes_mapping')) {
         $this->setAttribute('attributes_mapping_serialized', serialize($http->variable('attributes_mapping')));
     }
     return true;
 }
开发者ID:nxc,项目名称:nxc_import,代码行数:27,代码来源:csv_import_config.php


示例3: array

        eZDiscountSubRuleValue::removeBySubRuleID($discountRuleID);
        eZDiscountSubRule::remove($discountRuleID);
    }
    $db->commit();
    // we changed prices => remove content cache
    eZContentCacheManager::clearAllContentCache();
    $module->redirectTo($module->functionURI("discountgroupview") . "/" . $discountGroupID);
    return;
}
if ($http->hasPostVariable("AddCustomerButton")) {
    eZContentBrowse::browse(array('action_name' => 'AddCustomer', 'description_template' => 'design:shop/browse_discountcustomer.tpl', 'keys' => array('discountgroup_id' => $discountGroupID), 'content' => array('discountgroup_id' => $discountGroupID), 'from_page' => "/shop/discountgroupview/{$discountGroupID}"), $module);
    return;
}
// Add customer or customer group to this rule
if ($module->isCurrentAction('AddCustomer')) {
    $selectedObjectIDArray = eZContentBrowse::result('AddCustomer');
    $userIDArray = eZUserDiscountRule::fetchUserID($discountGroupID);
    $db = eZDB::instance();
    $db->begin();
    foreach ($selectedObjectIDArray as $objectID) {
        if (!in_array($objectID, $userIDArray)) {
            $userRule = eZUserDiscountRule::create($discountGroupID, $objectID);
            $userRule->store();
        }
    }
    $db->commit();
    // because we changed users, we have to remove content cache
    eZContentCacheManager::clearAllContentCache();
}
if ($http->hasPostVariable("RemoveCustomerButton")) {
    if ($http->hasPostVariable("CustomerIDArray")) {
开发者ID:jordanmanning,项目名称:ezpublish,代码行数:31,代码来源:discountgroupmembershipview.php


示例4: chooseOptionsToCopy

function chooseOptionsToCopy($Module, &$Result, $srcNode, $chooseVersions, $chooseCreator, $chooseTime)
{
    $selectedNodeIDArray = eZContentBrowse::result($Module->currentAction());
    $tpl = eZTemplate::factory();
    $tpl->setVariable('node', $srcNode);
    $tpl->setVariable('selected_node_id', $selectedNodeIDArray[0]);
    $tpl->setVariable('choose_versions', $chooseVersions);
    $tpl->setVariable('choose_creator', $chooseCreator);
    $tpl->setVariable('choose_time', $chooseTime);
    $Result['content'] = $tpl->fetch('design:content/copy_subtree.tpl');
    $Result['path'] = array(array('url' => false, 'text' => ezpI18n::tr('kernel/content', 'Content')), array('url' => false, 'text' => ezpI18n::tr('kernel/content', 'Copy subtree')));
}
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:12,代码来源:copysubtree.php


示例5: array

             if (!$parentNode) {
                 return $module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel', array());
             }
             $parentObject = $parentNode->object();
             if (!$parentObject) {
                 return $module->handleError(eZError::KERNEL_NOT_AVAILABLE, 'kernel', array());
             }
             $parentObjectID = $parentObject->attribute('id');
             $ignoreNodesSelect = array_unique($ignoreNodesSelect);
             $ignoreNodesSelectSubtree = array_unique($ignoreNodesSelectSubtree);
             $ignoreNodesClick = array_unique($ignoreNodesClick);
             $classIDArray = array_unique($classIDArray);
             $classIdentifierArray = array_unique($classIdentifierArray);
             $classGroupArray = array_unique($classGroupArray);
             $sectionIDArray = array_unique($sectionIDArray);
             eZContentBrowse::browse(array('action_name' => 'MoveNode', 'description_template' => 'design:content/browse_move_node.tpl', 'keys' => array('class' => $classIDArray, 'class_id' => $classIdentifierArray, 'classgroup' => $classGroupArray, 'section' => $sectionIDArray), 'ignore_nodes_select' => $ignoreNodesSelect, 'ignore_nodes_select_subtree' => $ignoreNodesSelectSubtree, 'ignore_nodes_click' => $ignoreNodesClick, 'persistent_data' => array('ContentNodeID' => implode(',', $moveIDArray), 'ViewMode' => $viewMode, 'ContentObjectLanguageCode' => $languageCode, 'MoveNodeAction' => '1'), 'permission' => array('access' => 'create', 'contentclass_id' => $classIDArray), 'content' => array('name_list' => $objectNameArray, 'node_id_list' => $moveIDArray), 'start_node' => $parentNodeID, 'cancel_page' => $module->redirectionURIForModule($module, 'view', array($viewMode, $parentNodeID, $languageCode)), 'from_page' => "/content/action"), $module);
         } else {
             eZDebug::writeError("Empty SelectedIDArray parameter for action " . $module->currentAction(), 'content/action');
             $module->redirectTo($module->functionURI('view') . '/' . $viewMode . '/' . $parentNodeID . '/');
         }
     } else {
         eZDebug::writeError("Missing SelectedIDArray parameter for action " . $module->currentAction(), 'content/action');
         $module->redirectTo($module->functionURI('view') . '/' . $viewMode . '/' . $parentNodeID . '/');
     }
 } else {
     if ($http->hasPostVariable('UpdatePriorityButton')) {
         $viewMode = $http->postVariable('ViewMode', 'full');
         if ($http->hasPostVariable('ContentNodeID')) {
             $contentNodeID = $http->postVariable('ContentNodeID');
         } else {
             eZDebug::writeError("Variable 'ContentNodeID' can not be found in template.");
开发者ID:heliopsis,项目名称:ezpublish-legacy,代码行数:31,代码来源:action.php


示例6: array

            // Redirect the to detail page for the object's elevation configuration
            $module->redirectToView( 'elevation_detail', array( $objectID ) );
        }
    }
}

// From elevate's landing page, trigger browsing for an object to elevate, or to search elevation for
elseif ( $http->hasPostVariable( 'ezfind-elevate-browseforobject' ) or
         $http->hasPostVariable( 'ezfind-searchelevateconfigurations-browse' ) )
{
    $actionName = $http->hasPostVariable( 'ezfind-elevate-browseforobject' ) ? 'ezfind-elevate-browseforobject' : 'ezfind-searchelevateconfigurations-browse';
    $elevateSearchQuery =  $http->hasPostVariable( 'ezfind-elevate-searchquery' ) ? $http->postVariable( 'ezfind-elevate-searchquery' ): '';
    $browseType = 'SelectObjectRelationNode';
    eZContentBrowse::browse( array( 'action_name' => $actionName,
                                    'type' =>  $browseType,
                                    'from_page' => $module->currentRedirectionURI(),
                                    'persistent_data' => array( 'elevateSearchQuery' => $elevateSearchQuery ) ),
                             $module );
}

// Store the actual Elevate configuration
else if ( $http->hasPostVariable( 'ezfind-elevate-do' ) )
{
    $doStorage = true;

    // Check if we have all required data
    // Validate ObjectID
    if ( !$http->hasPostVariable( 'elevateObjectID' ) or
         ( $elevatedObject = eZContentObject::fetch( $http->postVariable( 'elevateObjectID' ) ) ) === null
       )
    {
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:31,代码来源:elevate.php


示例7: if

    }
    if ( $http->hasPostVariable( 'NeedRedirectBack' ) )
    {
        return $Module->redirectTo( $http->postVariable( 'RedirectURI', $http->sessionVariable( 'LastAccessesURI', '/' ) ) );
    }
}
else if ( $Module->isCurrentAction( 'Add' )  )
{
    return eZContentBrowse::browse( array( 'action_name' => 'AddBookmark',
                                           'description_template' => 'design:content/browse_bookmark.tpl',
                                           'from_page' => "/content/bookmark" ),
                                    $Module );
}
else if ( $Module->isCurrentAction( 'AddBookmark' )  )
{
    $nodeList = eZContentBrowse::result( 'AddBookmark' );
    if ( $nodeList )
    {
        $db = eZDB::instance();
        $db->begin();
        foreach ( $nodeList as $nodeID )
        {
            $node = eZContentObjectTreeNode::fetch( $nodeID );
            if ( $node )
            {
                $nodeName = $node->attribute( 'name' );
                eZContentBrowseBookmark::createNew( $userID, $nodeID, $nodeName );
            }
        }
        $db->commit();
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:31,代码来源:bookmark.php


示例8:

                        $rssExport->store();
                    }
                }
            }
        }
    }
}
if ($http->hasPostVariable('Item_Count')) {
    $db = eZDB::instance();
    $db->begin();
    for ($itemCount = 0; $itemCount < $http->postVariable('Item_Count'); $itemCount++) {
        if ($http->hasPostVariable('SourceBrowse_' . $itemCount)) {
            $skipValues = $http->hasPostVariable('Ignore_Values_On_Browse_' . $itemCount) && $http->postVariable('Ignore_Values_On_Browse_' . $itemCount);
            eZRSSEditFunction::storeRSSExport($Module, $http, false, $skipValues ? $http->postVariable('Item_ID_' . $itemCount) : null);
            //
            eZContentBrowse::browse(array('action_name' => 'RSSObjectBrowse', 'description_template' => 'design:rss/browse_source.tpl', 'from_page' => '/rss/edit_export/' . $RSSExportID . '/' . $http->postVariable('Item_ID_' . $itemCount) . '/NodeSource'), $Module);
            break;
        }
        // remove selected source (if any)
        if ($http->hasPostVariable('RemoveSource_' . $itemCount)) {
            $itemID = $http->postVariable('Item_ID_' . $itemCount);
            if ($rssExportItem = eZRSSExportItem::fetch($itemID, true, eZRSSExport::STATUS_DRAFT)) {
                // remove the draft version
                $rssExportItem->remove();
                // remove the published version
                $rssExportItem->setAttribute('status', eZRSSExport::STATUS_VALID);
                $rssExportItem->remove();
                eZRSSEditFunction::storeRSSExport($Module, $http);
            }
            break;
        }
开发者ID:netbliss,项目名称:ezpublish,代码行数:31,代码来源:edit_export.php


示例9: customClassAttributeHTTPAction

 function customClassAttributeHTTPAction($http, $action, $classAttribute)
 {
     switch ($action) {
         case 'browse_for_placement':
             $module = $classAttribute->currentModule();
             $customActionName = 'CustomActionButton[' . $classAttribute->attribute('id') . '_browsed_for_placement]';
             eZContentBrowse::browse(array('action_name' => 'SelectObjectRelationListNode', 'content' => array('contentclass_id' => $classAttribute->attribute('contentclass_id'), 'contentclass_attribute_id' => $classAttribute->attribute('id'), 'contentclass_version' => $classAttribute->attribute('version'), 'contentclass_attribute_identifier' => $classAttribute->attribute('identifier')), 'persistent_data' => array($customActionName => '', 'ContentClassHasInput' => false), 'description_template' => 'design:class/datatype/browse_objectrelationlist_placement.tpl', 'from_page' => $module->currentRedirectionURI()), $module);
             break;
         case 'browsed_for_placement':
             $nodeSelection = eZContentBrowse::result('SelectObjectRelationListNode');
             if ($nodeSelection and count($nodeSelection) > 0) {
                 $nodeID = $nodeSelection[0];
                 $content = $classAttribute->content();
                 $content['default_placement'] = array('node_id' => $nodeID);
                 $classAttribute->setContent($content);
             }
             break;
         case 'disable_placement':
             $content = $classAttribute->content();
             $content['default_placement'] = false;
             $classAttribute->setContent($content);
             break;
         default:
             eZDebug::writeError("Unknown objectrelationlist action '{$action}'", __METHOD__);
             break;
     }
 }
开发者ID:nfrp,项目名称:ezpublish,代码行数:27,代码来源:ezobjectrelationlisttype.php


示例10: array

// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
//
$http = eZHTTPTool::instance();
$module = $Params["Module"];
$NodeID = $Params['NodeID'];
$exportTypeParam = $Params['ExportType'];
$tpl = eZTemplate::factory();
$success = true;
if ($http->hasPostVariable("ExportButton")) {
    eZContentBrowse::browse(array('action_name' => 'OOPlace', 'description_template' => 'design:ezodf/browse_place.tpl', 'content' => array(), 'from_page' => '/ezodf/export/', 'cancel_page' => '/ezodf/export/'), $module);
    return;
}
$doExport = false;
if ($module->isCurrentAction('OOPlace')) {
    // We have the file and the placement. Do the actual import.
    $selectedNodeIDArray = eZContentBrowse::result('OOPlace');
    $nodeID = $selectedNodeIDArray[0];
    $doExport = true;
}
if ($http->hasPostVariable("NodeID")) {
    $nodeID = $http->postVariable("NodeID");
    $doExport = true;
} else {
    if (is_numeric($NodeID)) {
        $nodeID = $NodeID;
        $doExport = true;
    }
}
$exportType = false;
if ($http->hasPostVariable("ExportType")) {
    $type = $http->postVariable("ExportType");
开发者ID:legende91,项目名称:ez,代码行数:31,代码来源:export.php


示例11: fetchHttpInput

 function fetchHttpInput($http, $module)
 {
     if ($http->hasPostVariable('NewRule_' . self::NOTIFICATION_HANDLER_ID)) {
         eZContentBrowse::browse(array('action_name' => 'AddSubtreeSubscribingNode', 'from_page' => '/notification/settings/'), $module);
     } else {
         if ($http->hasPostVariable('RemoveRule_' . self::NOTIFICATION_HANDLER_ID) and $http->hasPostVariable('SelectedRuleIDArray_' . self::NOTIFICATION_HANDLER_ID)) {
             $user = eZUser::currentUser();
             $userList = eZSubtreeNotificationRule::fetchList($user->attribute('contentobject_id'), false);
             foreach ($userList as $userRow) {
                 $listID[] = $userRow['id'];
             }
             $ruleIDList = $http->postVariable('SelectedRuleIDArray_' . self::NOTIFICATION_HANDLER_ID);
             foreach ($ruleIDList as $ruleID) {
                 if (in_array($ruleID, $listID)) {
                     eZPersistentObject::removeObject(eZSubtreeNotificationRule::definition(), array('id' => $ruleID));
                 }
             }
         } else {
             if ($http->hasPostVariable("BrowseActionName") and $http->postVariable("BrowseActionName") == "AddSubtreeSubscribingNode" and !$http->hasPostVariable('BrowseCancelButton')) {
                 $selectedNodeIDArray = $http->postVariable("SelectedNodeIDArray");
                 $user = eZUser::currentUser();
                 $existingNodes = eZSubtreeNotificationRule::fetchNodesForUserID($user->attribute('contentobject_id'), false);
                 foreach ($selectedNodeIDArray as $nodeID) {
                     if (!in_array($nodeID, $existingNodes)) {
                         $rule = eZSubtreeNotificationRule::create($nodeID, $user->attribute('contentobject_id'));
                         $rule->store();
                     }
                 }
                 //            $Module->redirectTo( "//list/" );
             }
         }
     }
 }
开发者ID:CG77,项目名称:ezpublish-legacy,代码行数:33,代码来源:ezsubtreehandler.php


示例12: array

    $subscriptionList->publish();
    return $Module->redirectToView('subscription_list', array($subscriptionList->attribute('url_alias')));
}
if ($http->hasPostVariable('CancelButton')) {
    $subscriptionList->removeDraft();
    return $Module->redirectToView('list_subscriptions');
}
$relatedObjectMap = array();
$extension = 'eznewsletter';
for ($count = 1; $count <= 3; ++$count) {
    $postName = 'BrowseRelatedObject_' . $count;
    $attributeName = 'related_object_id_' . $count;
    $selectName = 'related' . $count;
    $deleteName = 'DeleteRelatedObject_' . $count;
    if ($http->hasPostVariable($postName)) {
        return eZContentBrowse::browse(array('action_name' => 'ArticlePoolBrowse', 'keys' => array(), 'description_template' => "design:{$extension}/browse_article_pool.tpl", 'from_page' => 'newsletter/edit_subscription_list/' . $subscriptionListID . '/' . $selectName), $Module);
    }
    if ($http->hasPostVariable($deleteName)) {
        $subscriptionList->setAttribute($attributeName, 0);
        $subscriptionList->store();
    }
    if (isset($Params['BrowseSelected']) && $Params['BrowseSelected'] == $selectName) {
        if ($http->hasPostVariable('SelectedObjectIDArray')) {
            $relatedObjectID = $http->postVariable('SelectedObjectIDArray');
            if (isset($relatedObjectID) && !$http->hasPostVariable('BrowseCancelButton')) {
                $subscriptionList->setAttribute($attributeName, $relatedObjectID[0]);
                $subscriptionList->store();
            }
        }
    }
}
开发者ID:EVE-Corp-Center,项目名称:ECC-Website,代码行数:31,代码来源:edit_subscription_list.php


示例13: array

    if ($Module->isCurrentAction('Export')) {
        $pdfExport->setAttribute('source_node_id', $Module->actionParameter('SourceNode'));
        if ($pdfExport->attribute('status') == eZPDFExport::CREATE_ONCE && $pdfExport->countGeneratingOnceExports() > 0) {
            $validation['placement'][] = array('text' => ezpI18n::tr('kernel/pdf', 'An export with such filename already exists.'));
            $validation['processed'] = true;
            $inputValidated = false;
        }
    }
    if ($inputValidated) {
        $pdfExport->store();
    }
}
$setWarning = false;
// used to set missing options during export
if ($Module->isCurrentAction('BrowseSource')) {
    eZContentBrowse::browse(array('action_name' => 'ExportSourceBrowse', 'description_template' => 'design:content/browse_export.tpl', 'from_page' => '/pdf/edit/' . $pdfExport->attribute('id')), $Module);
} else {
    if ($Module->isCurrentAction('Export') && $inputValidated) {
        // remove the old file ( user may changed the filename )
        $originalPdfExport = eZPDFExport::fetch($Params['PDFExportID']);
        if ($originalPdfExport && $originalPdfExport->attribute('status') == eZPDFExport::CREATE_ONCE) {
            $filename = $originalPdfExport->attribute('filepath');
            if (file_exists($filename)) {
                unlink($filename);
            }
        }
        if ($pdfExport->attribute('status') == eZPDFExport::CREATE_ONCE) {
            generatePDF($pdfExport, $pdfExport->attribute('filepath'));
            $pdfExport->store(true);
            return $Module->redirect('pdf', 'list');
        } else {
开发者ID:,项目名称:,代码行数:31,代码来源:


示例14: array

    if (count($nodeIDArray) > 0 and is_numeric($nodeIDArray[0])) {
        // update the database.
        $nodeID = $nodeIDArray[0];
        if ($config === false) {
            $configList = eZSurveyRelatedConfig::fetchList();
            if (count($configList) == 0) {
                $config = eZSurveyRelatedConfig::create();
            } else {
                $config = $configList[0];
            }
        }
        $config->setAttribute('node_id', $nodeID);
        $config->store();
    }
}
if ($Module->isCurrentAction('BrowseForObjects')) {
    $assignedNodesIDs = array();
    eZContentBrowse::browse(array('action_name' => 'AddRelatedSurveyNode', 'description_template' => 'design:content/browse_related.tpl', 'content' => array(), 'keys' => array(), 'ignore_nodes_select' => $assignedNodesIDs, 'from_page' => $Module->redirectionURI('survey', 'wizard', array())), $Module);
    return eZModule::HOOK_STATUS_CANCEL_RUN;
}
$tpl = eZTemplate::factory();
$tpl->setVariable('state', $state);
$tpl->setVariable('content_class_list', $contentClassList);
if ($config !== false) {
    $tpl->setVariable('config', $config);
    $tpl->setVariable('survey_attribute_found', $surveyAttributeFound);
    $tpl->setVariable('browse_attribute', $browseAttribute);
}
$Result = array();
$Result['content'] = $tpl->fetch('design:survey/wizard.tpl');
$Result['path'] = array(array('url' => false, 'text' => ezpI18n::tr('survey', 'Survey Wizard')));
开发者ID:EVE-Corp-Center,项目名称:ECC-Website,代码行数:31,代码来源:wizard.php


示例15: customObjectAttributeHTTPAction


//.........这里部分代码省略.........
                                 $itemAdded->setAttribute('ts_visible', '0');
                                 $itemAdded->setAttribute('ts_hidden', '0');
                                 $itemAdded->setAttribute('action', 'modify');
                             } else {
                                 if (!$itemValid) {
                                     //if there is no same item in history and valid, also the item is not to be removed, add new
                                     $item = $block->addItem(new eZPageBlockItem());
                                     $item->setAttribute('object_id', $objectID);
                                     $item->setAttribute('node_id', $nodeID);
                                     $item->setAttribute('priority', $block->getItemCount());
                                     $item->setAttribute('ts_publication', time());
                                     $item->setAttribute('action', 'add');
                                 }
                             }
                         }
                     }
                     $contentObjectAttribute->setContent($page);
                     $contentObjectAttribute->store();
                 }
             }
             break;
         case 'new_item_browse':
             $module = $parameters['module'];
             $redirectionURI = $redirectionURI = $parameters['current-redirection-uri'];
             $page = $contentObjectAttribute->content();
             $zone = $page->getZone($params[1]);
             $block = $zone->getBlock($params[2]);
             $type = $block->attribute('type');
             $blockINI = eZINI::instance('block.ini');
             $classArray = false;
             if ($blockINI->hasVariable($type, 'AllowedClasses')) {
                 $classArray = $blockINI->variable($type, 'AllowedClasses');
             }
             eZContentBrowse::browse(array('class_array' => $classArray, 'action_name' => 'AddNewBlockItem', 'browse_custom_action' => array('name' => 'CustomActionButton[' . $contentObjectAttribute->attribute('id') . '_new_item-' . $params[1] . '-' . $params[2] . ']', 'value' => $contentObjectAttribute->attribute('id')), 'from_page' => $redirectionURI, 'cancel_page' => $redirectionURI, 'persistent_data' => array('HasObjectInput' => 0)), $module);
             break;
         case 'new_source':
             $page = $contentObjectAttribute->content();
             $zone = $page->getZone($params[1]);
             $block = $zone->getBlock($params[2]);
             if ($http->hasPostVariable('SelectedNodeIDArray')) {
                 $selectedNodeIDArray = $http->postVariable('SelectedNodeIDArray');
                 $blockINI = eZINI::instance('block.ini');
                 $fetchParametersSelectionType = $blockINI->variable($block->attribute('type'), 'FetchParametersSelectionType');
                 $fetchParams = unserialize($block->attribute('fetch_params'));
                 if ($fetchParametersSelectionType['Source'] == 'single') {
                     $fetchParams['Source'] = $selectedNodeIDArray[0];
                 } else {
                     $fetchParams['Source'] = $selectedNodeIDArray;
                 }
                 $block->setAttribute('fetch_params', serialize($fetchParams));
                 $persBlockObject = eZFlowBlock::fetch($block->attribute('id'));
                 if ($persBlockObject instanceof eZFlowBlock) {
                     $persBlockObject->setAttribute('last_update', 0);
                     $persBlockObject->store();
                 }
             }
             $contentObjectAttribute->setContent($page);
             $contentObjectAttribute->store();
             break;
         case 'new_source_browse':
             $page = $contentObjectAttribute->content();
             $zone = $page->getZone($params[1]);
             $block = $zone->getBlock($params[2]);
             $blockINI = eZINI::instance('block.ini');
             $fetchParametersSelectionType = $blockINI->variable($block->attribute('type'), 'FetchParametersSelectionType');
             $module = $parameters['module'];
开发者ID:BGCX067,项目名称:ezpublish-thetechtalent-svn-to-git,代码行数:67,代码来源:ezpagetype.php


示例16: if

    $rssImport->remove();
    return $Module->redirectTo( '/rss/list' );
}
else if ( $Module->isCurrentAction( 'BrowseDestination' ) )
{
    storeRSSImport( $rssImport, $http );
    return eZContentBrowse::browse( array( 'action_name' => 'RSSObjectBrowse',
                                           'description_template' => 'design:rss/browse_destination.tpl',
                                           'from_page' => '/rss/edit_import/'.$rssImportID.'/destination' ),
                                    $Module );
}
else if ( $Module->isCurrentAction( 'BrowseUser' ) )
{
    storeRSSImport( $rssImport, $http );
    return eZContentBrowse::browse( array( 'action_name' => 'RSSUserBrowse',
                                           'description_template' => 'design:rss/browse_user.tpl',
                                           'from_page' => '/rss/edit_import/'.$rssImportID.'/user' ),
                                    $Module );
}

// Check if coming from browse, if so store result
if ( isset( $Params['BrowseType'] ) )
{
    switch ( $Params['BrowseType'] )
    {
        case 'destination': // Returning from destination browse
        {
            $nodeIDArray = $http->hasPostVariable( 'SelectedNodeIDArray' ) ? $http->postVariable( 'SelectedNodeIDArray' ) : null;
            if ( isset( $nodeIDArray ) && !$http->hasPostVariable( 'BrowseCancelButton' ) )
            {
                $rssImport->setAttribute( 'destination_node_id', $nodeIDArray[0] );
                $rssImport->store();
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:32,代码来源:edit_import.php


示例17: foreach

        $db = eZDB::instance();
        $db->begin();
        foreach ($deleteIDArray as $deleteID) {
            eZRole::removeRole($deleteID);
        }
        // Clear role caches.
        eZRole::expireCache();
        // Clear all content cache.
        eZContentCacheManager::clearAllContentCache();
        $db->commit();
    }
}
// Redirect to content node browse in the user tree
// Assign the role for a user or group
if ($Module->isCurrentAction('AssignRole')) {
    $selectedObjectIDArray = eZContentBrowse::result('AssignRole');
    foreach ($selectedObjectIDArray as $objectID) {
        $role->assignToUser($objectID);
    }
    // Clear role caches.
    eZRole::expireCache();
    // Clear all content cache.
    eZContentCacheManager::clearAllContentCache();
}
if ($http->hasPostVariable('NewButton')) {
    $role = eZRole::createNew();
    return $Module->redirectToView('edit', array($role->attribute('id')));
}
$viewParameters = array('offset' => $offset);
$tpl = eZTemplate::factory();
$roles = eZRole::fetchByOffset($offset, $limit, $asObject = true, $ignoreTemp = true);
开发者ID:legende91,项目名称:ez,代码行数:31,代码来源:list.php


示例18: array

if ($module->isCurrentAction('Confirm')) {
    $type = $module->actionParameter('RestoreType');
    if ($type == 1) {
        $selectedNodeIDArray = array($location->attribute('parent_node'));
        $module->setCurrentAction('AddLocation');
    } elseif ($type == 2) {
        $languageCode = $object->attribute('initial_language_code');
        eZContentBrowse::browse(array('action_name' => 'AddNodeAssignment', 'description_template' => 'design:content/browse_placement.tpl', 'keys' => array('class' => $class->attribute('id'), 'class_id' => $class->attribute('identifier'), 'classgroup' => $class->attribute('ingroup_id_list'), 'section' => $object->attribute('section_id')), 'ignore_nodes_select' => array(), 'ignore_nodes_click' => array(), 'persistent_data' => array('ContentObjectID' => $objectID, 'AddLocationAction' => '1'), 'content' => array('object_id' => $objectID, 'object_version' => $version->attribute('version'), 'object_language' => $languageCode), 'cancel_page' => '/content/trash/', 'from_page' => "/content/restore/" . $objectID), $module);
        return;
    }
}
if ($module->isCurrentAction('AddLocation')) {
    // If $selectedNodeIDArray is already set then use it as it is,
    // if not get the browse data.
    if (!isset($selectedNodeIDArray)) {
        $selectedNodeIDArray = eZContentBrowse::result('AddNodeAssignment');
        if (!$selectedNodeIDArray) {
            return $module->redirectToView('trash');
        }
    }
    $db = eZDB::instance();
    $db->begin();
    $locationAdded = false;
    $mainNodeID = false;
    $newLocationList = array();
    $failedLocationList = array();
    foreach ($selectedNodeIDArray as $selectedNodeID) {
        $parentNode = eZContentObjectTreeNode::fetch($selectedNodeID);
        $parentNodeObject = $parentNode->attribute('object');
        $canCreate = $parentNode->checkAccess('create', $class->attribute('id'), $parentNodeObject->attribute('contentclass_id')) == 1;
        if ($canCreate) {
开发者ID:rmiguel,项目名称:ezpublish,代码行数:31,代码来源:restore.php


示例19: array

     }
 }
 else
 {
     // Redirect to content node browse
     $classList = $currentUser->canAssignSectionToClassList( $SectionID );
     if ( count( $classList ) > 0 )
     {
         if ( in_array( '*', $classList ) )
         {
             $classList = false;
         }
         eZContentBrowse::browse( array( 'action_name' => 'AssignSection',
                                         'keys' => array(),
                                         'description_template' => 'design:section/browse_assign.tpl',
                                         'content' => array( 'section_id' => $SectionID ),
                                         'from_page' => '/section/assign/' . $SectionID . "/",
                                         'cancel_page' => '/section/list',
                                         'class_array' => $classList ),
                                  $Module );
         return;
     }
     else
     {
         $tpl = eZTemplate::factory();
         $tpl->setVariable( 'section_name', $section->attribute( 'name' ) );
         $tpl->setVariable( 'error_number', 2 );
         $Result = array();
         $Result['content'] = $tpl->fetch( "design:section/assign_notification.tpl" );
         $Result['path'] = array( array( 'url' => false,
                                         'text' => ezpI18n::tr( 'kernel/section', 'Sections' ) ),
                                  array( 'url' => false,
开发者ID:robinmuilwijk,项目名称:ezpublish,代码行数:32,代码来源:assign.php


示例20: browse

 static function browse($parameters = array(), &$module)
 {
     $ini = eZINI::instance('browse.ini');
     if (!isset($parameters['action_name'])) {
         $parameters['action_name'] = $ini->variable('BrowseSettings', 'DefaultActionName');
     }
     if (!isset($parameters['type'])) {
         $parameters['type'] = $parameters['action_name'];
     }
     //$ini->variable( $parameters['action_name'], 'BrowseType' );
     if (!isset($parameters['selection'])) {
         if ($ini->hasVariable($parameters['type'], 'SelectionType')) {
             $parameters['selection'] = $ini->variable($parameters['type'], 'SelectionType');
         } else {
             $parameters['selection'] = $ini->variable('BrowseSettings', 'DefaultSelectionType');
         }
     }
     if (!isset($parameters['return_type'])) {
         if ($ini->hasVariable($parameters['type'], 'ReturnType')) {
             $parameters['return_type'] = $ini->variable($parameters['type'], 'ReturnType');
         } else {
             $parameters['return_type'] = $ini->variable('BrowseSettings', 'DefaultReturnType');
         }
     }
     if (!isset($parameters['browse_custom_action'])) {
         $parameters['browse_custom_action'] = false;
     }
     if (!isset($parameters['custom_action_data'])) {
         $parameters['custom_action_data'] = false;
     }
     if (!isset($parameters['description_template'])) {
         $parameters['description_template'] = false;
     }
     if (!isset($parameters['start_node'])) {
         $parameters['start_node'] = $ini->variable($parameters['type'], 'StartNode');
     }
     if (!isset($parameters['ignore_nodes_select'])) {
         $parameters['ignore_nodes_select'] = array();
     }
     if (!isset($parameters['ignore_nodes_select_subtree'])) {
         $parameters['ignore_nodes_select_subtree'] = array();
     }
     if (!isset($parameters['ignore_nodes_click'])) {
         $parameters['ignore_nodes_click'] = array();
     }
     if (!isset($parameters['class_array'])) {
         if ($ini->hasVariable($parameters['type'], 'Class')) {
             $parameters['class_array'] = $ini->variable($parameters['type'], 'Class');
         } else {
             $parameters['class_array'] = false;
         }
     }
     if (isset($parameters['keys'])) {
         $overrideStartNode = false;
         foreach ($parameters['keys'] as $key => $keyValue) {
             $variableName = 'StartNode_' . $key;
             if (!$ini->hasVariable($parameters['type'], $variableName)) {
                 continue;
             }
             $keyData = $ini->variable($parameters['type'], $variableName);
             if (is_array($keyValue)) {
                 foreach ($keyValue as $keySubValue) {
                     if (isset($keyData[$keySubVal 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP eZContentCacheManager类代码示例发布时间:2022-05-23
下一篇:
PHP eZCollaborationItem类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap