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


PHP View::make方法代碼示例

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


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

示例1: index

 public function index($id = null)
 {
     if (!$id) {
         \Core\Route::redirectTo('/absent');
     } else {
         $id = str_replace("id", "", $id);
         $user = \Models\User::findUserById($id);
         if (isset($user['id'])) {
             $user = \Models\User::getUserPersonalById($user['id']);
             $task = \Models\Load::issetUploadFile('task');
             if ($task != false) {
                 \Models\Load::uploadTask($_FILES[$task]);
             }
             $data = \Models\User::findUserById($id);
             $tasks = \Models\Task::showTask();
             echo View::make('header', ['title' => $user['l_name'] . " " . $user['f_name']]);
             if ($user['member'] == 'Mather') {
                 echo View::make('user.leftside', ['id' => $id, 'user' => $user]);
             }
             if ($user['member'] == 'Father') {
                 echo View::make('user.profileF', ['data' => $data, 'tasks' => $tasks]);
             } else {
                 echo View::make('user.profile', ['data' => $data, 'tasks' => $tasks]);
             }
             echo View::make('footer');
         } else {
             \Core\Route::redirectTo('/absent');
         }
     }
 }
開發者ID:kazak600,項目名稱:Task-manager,代碼行數:30,代碼來源:user.php

示例2: index

 public function index()
 {
     if (!isset($_GET['code'])) {
         header("Location: ../sign-in/index");
         exit;
     }
     $testActivation = \Models\User::getUsernameByActivationCode($_GET['code']);
     if (!isset($testActivation['username'])) {
         echo \Core\View::make('header', ['title' => 'Activation unsuccessful']);
         echo \Core\View::make('activation.bad');
         echo \Core\View::make('footer');
     } else {
         $date = date('Y-m-d H:i:s');
         $user = \Models\User::setUserActivatedAt($date, $_GET['code']);
         if (isset($user['id'])) {
             $subject = 'Welcome';
             $body = "Congratulations. Your account is activated.";
             $result = Mailer::send($user['email'], $subject, $body);
             if ($result == 'Message has been sent') {
                 echo \Core\View::make('header');
                 echo \Core\View::make('activation.good', ['title' => 'Activation successful']);
                 echo \Core\View::make('footer');
             }
         }
     }
 }
開發者ID:kazak600,項目名稱:Task-manager,代碼行數:26,代碼來源:activation.php

示例3: subpage

 /**
  * Render the subpage page.
  *
  * @param  \Psr\Http\Message\ServerRequestInterface $request
  * @param  \Psr\Http\Message\ResponseInterface $response
  * @return \Psr\Http\Message\ResponseInterface
  */
 public function subpage(Request $request, Response $response)
 {
     $translator = $this->get('translator');
     $data = ['title' => $translator->get('welcome.subpage_text'), 'welcomeMessage' => $translator->get('welcome.subpage_message')];
     $view = View::make('layouts::default', $data);
     $view->nest('body', 'welcome.subpage', $data);
     return $response->write($view);
 }
開發者ID:bvqbao,項目名稱:app-skeleton,代碼行數:15,代碼來源:Welcome.php

示例4: personal

 public function personal()
 {
     if (\Models\Auth::isAuth()) {
         $avatar = \Models\Images::issetUploadImages('avatar');
         if ($avatar != false) {
             \Models\Images::uploadAvatar($_FILES[$avatar]);
         }
         $personal = [];
         $personal = \Models\User::getUserPersonalById($_SESSION['auth']['id']);
         $plug = \Models\Images::isPlug($_SESSION['auth']['id'] . '.jpg');
         echo View::make('header', ['title' => 'Personal']);
         echo View::make('user.leftside', ['id' => $_SESSION['auth']['id'], 'plug' => $plug]);
         echo View::make('user.personal', ['personal' => $personal]);
         echo View::make('footer');
     } else {
         \Core\Route::redirectTo('/absent');
     }
 }
開發者ID:kazak600,項目名稱:test-task.dev,代碼行數:18,代碼來源:user.php

示例5: index

 public function index()
 {
     echo View::make('header', ['title' => 'Authentication']);
     echo View::make('sign_in.sign-in', ['title' => 'Sign in']);
     echo View::make('footer');
 }
開發者ID:kazak600,項目名稱:Task-manager,代碼行數:6,代碼來源:sign_in.php

示例6: index

 public function index()
 {
     echo View::make('header', ['title' => 'Add task']);
     echo View::make('task.add-task');
     echo View::make('footer');
 }
開發者ID:kazak600,項目名稱:Task-manager,代碼行數:6,代碼來源:task.php

示例7: index

 public function index()
 {
     echo \Core\View::make('header', ['title' => 'Registration']);
     echo \Core\View::make('sign_up.sign-up', ['title' => 'Registration']);
     echo \Core\View::make('footer');
 }
開發者ID:kazak600,項目名稱:Task-manager,代碼行數:6,代碼來源:sign_up.php

示例8: nest

 /**
  * Add a view instance to the view data.
  *
  * <code>
  *     // Add a View instance to a View's data
  *     $view = View::make('foo')->nest('footer', 'Partials/Footer');
  *
  *     // Equivalent functionality using the "with" method
  *     $view = View::make('foo')->with('footer', View::make('Partials/Footer'));
  * </code>
  *
  * @param  string  $key
  * @param  string  $view
  * @param  array   $data
  * @param  string|null  $module
  * @return View
  */
 public function nest($key, $view, array $data = array(), $module = null)
 {
     return $this->with($key, View::make($view, $data, $module));
 }
開發者ID:alejandrozepeda,項目名稱:dcorrido,代碼行數:21,代碼來源:View.php

示例9: password

 public function password()
 {
     echo \Core\View::make('header', ['title' => 'Recovery password']);
     echo \Core\View::make('forgot.email', ['title' => 'Recovery password']);
     echo \Core\View::make('footer');
 }
開發者ID:kazak600,項目名稱:Task-manager,代碼行數:6,代碼來源:forgot.php


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