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


PHP runner::redirect_route方法代码示例

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


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

示例1: array_shift

        if (is_array($model)) {
            $model = array_shift($model);
        }
        $runner->context["model"] = $model;
    }
} elseif (isset($runner->context["reference"], $runner->context["model_class"])) {
    $router = false;
    $model = false;
    /*
    $context = array(
    	"self" => array("reference" => $runner->context["reference"])
    );
    */
    $context = array("direct" => $runner->context["reference"], "session" => \runner::stack("session_id"), "silent" => true);
    $model_route = "/model/" . $runner->context["model_class"];
    \runner::redirect_route($model_route, \runner::config("scaffold"), true, $context, $router, $model);
    if (is_array($model)) {
        $model = array_shift($model);
    }
    $runner->context["model"] = $model;
    if ($model && $model->permission && !$model->writable()) {
        $allowed = false;
    }
}
?>
<div class="portlet light">
	<div class="portlet-title">
		<div class="caption font-red col-md-6">
			<i class="fa fa-file-text-o font-red"></i>
			<span class="caption-subject bold uppercase"> Properties</span>
		</div>
开发者ID:RetroscopeCreative,项目名称:RouterunnerCMS,代码行数:31,代码来源:properties.view.php

示例2: array_shift

         if (isset($field_data["crop"])) {
             $crops[$field_name] = $field_data["crop"];
         }
     }
     $field_data = $fields[$field];
 }
 $parents = \Routerunner\Bootstrap::parent($reference);
 if (isset($parents[0]["model_class"]) && $parents[0]["model_class"] == "lang") {
     $lang = array_shift($parents);
 }
 $path_route = '';
 while ($parent = array_shift($parents)) {
     $_model_context = array("direct" => $parent["reference"], "session" => \runner::stack("session_id"));
     $router = false;
     $route = '/model/' . $parent["model_class"];
     \runner::redirect_route($route, \runner::config("scaffold"), true, $_model_context, $router, $parent_model);
     if (is_array($parent_model) && count($parent_model) == 1) {
         $parent_model = array_shift($parent_model);
     }
     if (isset($parent_model) && is_object($parent_model) && get_parent_class($parent_model) == "Routerunner\\BaseModel" && isset($parent_model->label)) {
         $path_route .= \runner::toAscii($parent_model->label) . DIRECTORY_SEPARATOR;
     }
     $debug = 1;
 }
 if (isset($value["src"])) {
     // crop image
     $src = $_SESSION["runner_config"]['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $_SESSION["runner_config"]["SITEROOT"] . $value["src"];
     $filename = substr($value["src"], strrpos($value["src"], DIRECTORY_SEPARATOR) + 1);
     $mimetype = false;
     $layer = ImageWorkshop::initFromPath($src, false, $mimetype);
     if (isset($value["rotate"])) {
开发者ID:RetroscopeCreative,项目名称:RouterunnerCMS,代码行数:31,代码来源:crop_cropper.php


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