本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}