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


PHP Render::layout方法代码示例

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


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

示例1: link

 /**
  * Listing accounts
  */
 public static function link($link = '')
 {
     $share = array();
     $data = array();
     $task = array();
     $service = array();
     $backups = array();
     $profile = array();
     $share = SharesModel::first(array('link' => $link));
     if ($share) {
         $share = $share->toArray();
         $data = json_decode($share['data'], true);
         if (strtotime($share['created_at']) + $share['expires'] > time()) {
             $task = TasksModel::first($share['task_id'])->toArray();
             $service = ServicesModel::first($share['service_id'])->toArray();
             $profile = UsersModel::profile($task['user_id']);
             $backups = call_user_func_array(array('app\\libraries\\' . $service['library'], 'shared'), array($task));
         } else {
             \Util::notice(array('type' => 'danger', 'text' => 'The requested link has expired.'));
         }
     } else {
         \Util::notice(array('type' => 'danger', 'text' => 'The requested link does not exist.'));
     }
     $templateData = array('template' => 'shared/content', 'title' => 'Migrate - Shared Data', 'bodyId' => 'shared', 'styles' => array('shared.css'), 'scripts' => array('common/request.js', 'shared.js'), 'share' => $share, 'data' => $data, 'task' => $task, 'service' => $service, 'backups' => $backups, 'profile' => $profile);
     \Render::layout('template', $templateData);
 }
开发者ID:unDemian,项目名称:gcdc-migrate,代码行数:29,代码来源:shared.php

示例2: details

 public static function details($id)
 {
     $templateData = array('template' => 'migrate/details', 'title' => 'Migrate - Details', 'bodyId' => 'details', 'styles' => array('common/wizard.css', 'migrate/details.css'), 'scripts' => array('common/wizard.js', 'migrate/details.js'), 'task' => TasksModel::details($id));
     $templateData['source'] = $_SESSION['usernames'][$templateData['task']['user_id']];
     $templateData['destination'] = $_SESSION['usernames'][$templateData['task']['user_affected_id']];
     \Render::layout('template', $templateData);
 }
开发者ID:unDemian,项目名称:gcdc-migrate,代码行数:7,代码来源:migrate.php

示例3: index

 /**
  * Listing accounts
  */
 public static function index()
 {
     $templateData = array('template' => 'activity/content', 'title' => 'Migrate - Activity Queue', 'bodyId' => 'tasks', 'styles' => array('activity.css'), 'scripts' => array('activity.js'), 'polling' => TasksModel::listingFor(array('user_id' => $_SESSION['current']['username']['id'], 'user_affected_id' => $_SESSION['current']['username']['id'], 'status' => array(TasksModel::STATUS_PROGRESS, TasksModel::STATUS_REVERTING))) ? 'yes' : 'no', 'tasks' => TasksModel::listingFor(array('user_id' => $_SESSION['current']['username']['id'], 'user_affected_id' => $_SESSION['current']['username']['id'])));
     // Mark as viewed
     if ($templateData['polling'] == 'no') {
         TasksModel::markAsRead(array('user_id' => $_SESSION['current']['username']['id'], 'user_affected_id' => $_SESSION['current']['username']['id']));
     }
     \Render::layout('template', $templateData);
 }
开发者ID:unDemian,项目名称:gcdc-migrate,代码行数:12,代码来源:activity.php

示例4: index

 /**
  * Dashboard index page
  */
 public static function index($finish = false)
 {
     if ($finish) {
         \Auth::showWizard('finish');
     } else {
         if (\Auth::showWizard()) {
             \Router::redirect('accounts/permissions');
         }
     }
     $templateData = array('template' => 'dashboard/content', 'title' => 'Migrate - Dashboard', 'bodyId' => 'dashboard', 'styles' => array('dashboard.css'), 'scripts' => array(), 'queue' => TasksModel::listingFor(array('user_id' => $_SESSION['current']['username']['id'], 'user_affected_id' => $_SESSION['current']['username']['id']), 4), 'services' => ServicesModel::forUser(array('id' => $_SESSION['current']['username']['id'], 'limit' => 4)), 'usernames' => $_SESSION['usernames'], 'intro' => (bool) IntroModel::first(array('page' => 'dashboard', 'group' => $_SESSION['current']['username']['group'])));
     if (!$templateData['intro']) {
         IntroModel::create(array('page' => 'dashboard', 'group' => $_SESSION['current']['username']['group']))->save();
     }
     \Render::layout('template', $templateData);
 }
开发者ID:unDemian,项目名称:gcdc-migrate,代码行数:18,代码来源:dashboard.php

示例5: permissions

 public static function permissions()
 {
     $templateData = array('template' => 'accounts/permissions', 'title' => 'Migrate - Permissions', 'bodyId' => 'accounts-update', 'styles' => array('accounts.css'), 'scripts' => array('accounts.js'), 'heading' => 'Select your services', 'description' => 'These are the current available services that can be used in our operations. You can select any time which services are we allowed to use. If you roll-over a service name you can see all the permissions and what action can we performe.', 'services' => ServicesModel::withPermissions(), 'servicesSoon' => ServicesModel::all(array('status' => ServicesModel::STATUS_SOON))->toArray(), 'selectedServices' => UsersServicesModel::all(array('user_id' => $_SESSION['current']['username']['id']))->column('service_id'), 'skipUrl' => 'accounts/add', 'step' => 1);
     \Render::layout('template', $templateData);
 }
开发者ID:unDemian,项目名称:gcdc-migrate,代码行数:5,代码来源:accounts.php

示例6: index

 /**
  * Listing accounts
  */
 public static function index($selectedService = 0)
 {
     \Auth::showWizard('finish');
     $templateData = array('template' => 'backup/content', 'title' => 'Migrate - Backup', 'bodyId' => 'backup', 'styles' => array('backup.css'), 'scripts' => array('common/wizard.js', 'backup.js'), 'services' => $_SESSION['current']['services']);
     \Render::layout('template', $templateData);
 }
开发者ID:unDemian,项目名称:gcdc-migrate,代码行数:9,代码来源:_backup.php

示例7: index

 /**
  * Login Page
  */
 public static function index()
 {
     $templateData = array('template' => 'login/content', 'title' => 'Migrate Google Data', 'bodyId' => 'login', 'styles' => array('login.css'), 'scripts' => array('login.js'));
     \Render::layout('template', $templateData);
 }
开发者ID:unDemian,项目名称:gcdc-migrate,代码行数:8,代码来源:login.php

示例8: index

 public static function index()
 {
     $templateData = array('template' => 'error/content', 'title' => 'Migrate - Not found', 'bodyId' => '404', 'styles' => array('error.css'), 'scripts' => array());
     \Render::layout('template', $templateData);
 }
开发者ID:unDemian,项目名称:gcdc-migrate,代码行数:5,代码来源:error.php

示例9: index

 /**
  * Listing accounts
  */
 public static function index($selectedService = 0)
 {
     $templateData = array('template' => 'import/content', 'title' => 'Migrate - Import', 'bodyId' => 'import', 'styles' => array('import.css'), 'scripts' => array(), 'history' => TasksModel::listingFor(array('user_id' => $_SESSION['current']['username']['id'], 'type' => TasksModel::TYPE_IMPORT)), 'services' => $_SESSION['current']['services']);
     \Render::layout('template', $templateData);
 }
开发者ID:unDemian,项目名称:gcdc-migrate,代码行数:8,代码来源:_import.php


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