當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。