當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Presenter::make方法代碼示例

本文整理匯總了PHP中Presenter::make方法的典型用法代碼示例。如果您正苦於以下問題:PHP Presenter::make方法的具體用法?PHP Presenter::make怎麽用?PHP Presenter::make使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Presenter的用法示例。


在下文中一共展示了Presenter::make方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: editPermissions

 public function editPermissions()
 {
     /** @var SettingsHandler $manageHandler */
     $manageHandler = app('xe.settings');
     $permissionGroups = $manageHandler->getPermissionList();
     return \Presenter::make('settings.permissions', compact('permissionGroups'));
 }
開發者ID:mint-soft-com,項目名稱:xpressengine,代碼行數:7,代碼來源:SettingsController.php

示例2: getEdit

 public function getEdit(Request $request)
 {
     $themeId = $request->get('theme');
     $fileName = $request->get('file');
     $type = $request->get('type', 'template');
     // TODO: validate themeid, fileName
     if ($themeId === null) {
         $e = new InvalidArgumentHttpException();
         $e->setMessage('잘못된 요청입니다.');
         throw $e;
     }
     $theme = \Theme::getTheme($themeId);
     /** @var ThemeEntity $theme */
     $files = $theme->getEditFiles();
     if ($fileName === null) {
         $fileName = key($files[$type]);
     }
     if (!is_writable($files[$type][$fileName])) {
         \View::share('_alert', ['type' => 'danger', 'message' => '파일을 수정할 권한이 없습니다. 웹서버의 계정이 편집할 파일의 쓰기(w)권한을 가지고 있어야 합니다.']);
     }
     $fileContent = file_get_contents($files[$type][$fileName]);
     $editFile = ['fileName' => $fileName, 'path' => $files[$type][$fileName], 'content' => $fileContent];
     return \Presenter::make('theme.edit', ['theme' => $theme, 'files' => $files, 'editFile' => $editFile, 'type' => $type]);
 }
開發者ID:mint-soft-com,項目名稱:xpressengine,代碼行數:24,代碼來源:ThemeController.php

示例3: index

 public function index()
 {
     \Frontend::title('XpressEngine3 Settings');
     return \Presenter::make('settings.dashboard');
 }
開發者ID:qkrcjfgus33,項目名稱:xpressengine,代碼行數:5,代碼來源:DashboardController.php

示例4: render

 /**
  * Render an exception into an HTTP response.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Exception               $e
  *
  * @return \Illuminate\Http\Response
  */
 public function render($request, Exception $e)
 {
     $responseException = $this->filter($e);
     // debugging mode
     if (config('app.debug') && $e instanceof AccessDeniedHttpException === false) {
         return $this->renderDebugMode($request, $e, $responseException);
     }
     // post request
     if ($request->isMethod('post') && !$request->ajax() && !$request->wantsJson()) {
         return redirect()->back()->with('alert', ['type' => 'danger', 'statusCode' => $responseException->getStatusCode(), 'message' => $responseException->getMessage()])->withInput();
     }
     $view = null;
     // ajax request
     if ($request->ajax() || $request->wantsJson()) {
         $view = \Presenter::makeApi(['message' => $responseException->getMessage()]);
     } else {
         \Presenter::setSkin('error');
         \Theme::selectBlankTheme();
         $view = \Presenter::make('error', ['type' => 'danger', 'exception' => $responseException, 'message' => $responseException->getMessage()]);
     }
     return response($view, $responseException->getStatusCode());
 }
開發者ID:mint-soft-com,項目名稱:xpressengine,代碼行數:30,代碼來源:Handler.php

示例5: getLogin

 /**
  * Show the application login form.
  *
  * @return \Illuminate\Http\Response
  */
 public function getLogin(UrlGenerator $urlGenerator, Request $request)
 {
     $redirectUrl = $this->redirectPath = $request->get('redirectUrl', $urlGenerator->previous());
     // common config
     $config = app('xe.config')->get('member.common');
     $loginRuleName = 'login';
     \Frontend::rule($loginRuleName, ['email' => 'required|email_prefix', 'password' => 'required']);
     return \Presenter::make('login', compact('config', 'loginRuleName', 'redirectUrl'));
 }
開發者ID:qkrcjfgus33,項目名稱:xpressengine,代碼行數:14,代碼來源:AuthController.php

示例6: route

 protected function route()
 {
     // implement code
     Route::settings(self::getId(), function () {
         Route::get('/', ['as' => 'manage.openseminar_1212.index', 'uses' => 'ManagerController@index']);
         Route::post('/', ['as' => 'manage.openseminar_1212.updateConfig', 'uses' => 'ManagerController@updateConfig']);
         Route::get('/pointLog', ['as' => 'manage.openseminar_1212.point_log', 'uses' => 'ManagerController@pointLog']);
     }, ['namespace' => 'Akasima\\OpenSeminar\\Controller']);
     Route::fixed($this->getId(), function () {
         Route::get('/', ['as' => 'openseminar_1212::index', 'uses' => function (Request $request) {
             $title = 'Open seminar 2015-12-12';
             // set browser title
             Frontend::title($title);
             // load css file
             Frontend::css($this->asset('assets/style.css'))->load();
             // output
             return Presenter::make('index', ['title' => $title]);
         }]);
     });
 }
開發者ID:akasima,項目名稱:openseminar_1212,代碼行數:20,代碼來源:plugin.php


注:本文中的Presenter::make方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。