当前位置: 首页>>代码示例>>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;未经允许,请勿转载。