当前位置: 首页>>代码示例>>PHP>>正文


PHP eZModule::redirectTo方法代码示例

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


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

示例1: redirect

 /**
  * Trasforma le variabili $_GET in view_parameters e redirige la richiesta in base al parametro $_GET['RedirectUrlAlias']
  *
  * @see modules/ocsearch/action.php
  * @param array $requestFields
  * @param eZModule $module
  */
 public static function redirect(array $requestFields, eZModule $module = null)
 {
     $result = new OCClassSearchFormFetcher();
     $result->setRequestFields($requestFields);
     if ($module) {
         $redirect = '/';
         if (isset($requestFields['RedirectUrlAlias'])) {
             $redirect = $requestFields['RedirectUrlAlias'];
         } elseif (isset($requestFields['RedirectNodeID'])) {
             $node = eZContentObjectTreeNode::fetch($requestFields['RedirectNodeID']);
             if ($node instanceof eZContentObjectTreeNode) {
                 $redirect = $node->attribute('url_alias');
             }
         }
         $redirect = rtrim($redirect, '/') . $result->getViewParametersString();
         $module->redirectTo($redirect);
     }
 }
开发者ID:OpencontentCoop,项目名称:ocsearchtools,代码行数:25,代码来源:occlasssearchformhelper.php

示例2: handleTagChooserImport

 /**
  * @deprecated usare un client ad hoc
  *
  * @param eZModule $module
  * @param eZTemplate $tpl
  * @param $repositoryNodeID
  * @param $localParentNodeID
  *
  * @throws Exception
  */
 protected function handleTagChooserImport(eZModule $module, eZTemplate $tpl, $repositoryNodeID, $localParentNodeID, &$Result)
 {
     if (isset($this->attributes['definition']['AskTagTematica']) && $this->attributes['definition']['AskTagTematica'] == true) {
         $http = eZHTTPTool::instance();
         if (!$http->hasPostVariable('SelectTags')) {
             $tpl->setVariable('fromPage', '/repository/import/' . $this->attributes['definition']['Identifier'] . '/' . $repositoryNodeID);
             $tpl->setVariable('localParentNodeID', $localParentNodeID);
             $Result['content'] = $tpl->fetch('design:repository/eztagschooser.tpl');
             $Result['path'] = array(array('url' => false, 'text' => 'Scegli Tag'));
             return;
         } else {
             $tagIDs = array();
             $tagKeywords = array();
             $tagParents = array();
             foreach ($_POST as $key => $value) {
                 if (substr($key, 0, 8) == 'tematica') {
                     list($tagID, $tagKeyword, $tagParent) = explode(";", $value);
                     $tagIDs[] = $tagID;
                     $tagKeywords[] = $tagKeyword;
                     $tagParents[] = $tagParent;
                 }
             }
         }
         $newObject = $this->import($repositoryNodeID, $localParentNodeID);
         foreach ($newObject->contentObjectAttributes() as $attribute) {
             if ($attribute->contentClassAttributeIdentifier() == 'tematica') {
                 $eZTags = new eZTags();
                 $eZTags->createFromStrings(implode('|#', $tagIDs), implode('|#', $tagKeywords), implode('|#', $tagParents));
                 $eZTags->store($attribute);
                 break;
             }
         }
         $module->redirectTo($newObject->attribute('main_node')->attribute('url_alias'));
     } else {
         $newObject = $this->import($repositoryNodeID, $localParentNodeID);
         $module->redirectTo($newObject->attribute('main_node')->attribute('url_alias'));
     }
 }
开发者ID:OpencontentCoop,项目名称:ocsearchtools,代码行数:48,代码来源:ocrepositorycontentclassclient.php

示例3: redirect

/**
 * Redirects the user
 *
 * @param eZHTTPTool $http
 * @param eZModule $module
 * @return mixed
 */
function redirect($http, $module)
{
    $http->removeSessionVariable('NGConnectAuthResult');
    $http->removeSessionVariable('NGConnectForceRedirect');
    if ($http->hasSessionVariable('NGConnectLastAccessURI')) {
        return $module->redirectTo($http->sessionVariable('NGConnectLastAccessURI'));
    } else {
        return $module->redirectTo('/');
    }
}
开发者ID:netgen,项目名称:ngconnect,代码行数:17,代码来源:profile.php


注:本文中的eZModule::redirectTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。