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


PHP HTML::render方法代码示例

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


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

示例1: toHtml

 public function toHtml()
 {
     $select = new HTML('select');
     if ($this->readOnly) {
         $select->attr('disabled', 'disabled');
     }
     if ($this->multiple) {
         $select->attr('multiple', 'multiple');
     }
     if ($this->name === null) {
         $this->name = $this->id;
     }
     $select->addCssClasses($this->cssClasses)->css('form-control')->attr('name', $this->name)->attr('id', $this->id);
     foreach ($this->options as $option) {
         $optionHtml = new Html('option');
         $optionHtml->attr('value', $option['value'])->text($option['text']);
         if ($this->isSelected($option['value'])) {
             $optionHtml->attr('selected', 'selected');
         }
         $select->text($optionHtml);
     }
     return $select->render();
 }
开发者ID:new-frontiers,项目名称:nostromo-controls,代码行数:23,代码来源:InputSelectControl.php

示例2: isset

<?php

$page = isset($_GET['page']) ? $_GET['page'] : 1;
if (!preg_match('/^\\d+$/', $page)) {
    dispatch('core/backend/404');
    exit;
}
$objects = Company::findAll();
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Company', 'zh' => '公司'))), true);
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$perpage = 50;
$total = Company::countAll();
$total_page = ceil($total / $perpage);
$html->renderOut('company/backend/company_list', array('objects' => Company::findAllWithPage($page, $perpage), 'current_page' => $page, 'total_page' => $total_page, 'total' => $total, 'pager' => $html->render('core/components/pagination', array('total' => $total_page, 'page' => $page)), 'start_entry' => ($page - 1) * $perpage + 1, 'end_entry' => min(array($total, $page * $perpage))), true);
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
开发者ID:jeffreycai,项目名称:chaoliu,代码行数:19,代码来源:company_list.php

示例3: foreach

<?php

/** handle submission **/
if (isset($_POST['submit'])) {
    $content = "<table>";
    foreach ($_POST as $key => $val) {
        $tokens = explode("_", $key);
        $key = "";
        foreach ($tokens as $token) {
            $key .= ucfirst($token) . " ";
        }
        $content .= "<tr><th>{$key}</th><td>{$val}</td></tr>";
    }
    $content .= "</table>";
    sendemailAdmin($settings['sitename'] . " - Apply for course", $content);
    Message::register(new Message(Message::SUCCESS, 'Thank you for your application. We will contact you soon!'));
}
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => 'Apply for a course', 'body_class' => 'page page-template page-template-templates page-template-full-width page-template-templatesfull-width-php has-toolbar'));
$html->output('<div id="page-container">');
//$html->renderOut('site/components/toptoolbar');
$html->renderOut('site/components/header');
$html->renderOut('site/apply', array('full_page_sidebar_right' => $html->render('site/components/full_page_sidebar_right', array('blocks' => array(Block::findByName('Get in Touch'))))));
$html->renderOut('site/components/footer');
$html->output('</div>');
$html->renderOut('site/components/page_footer');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:ct21,代码行数:27,代码来源:apply.php

示例4: isset

<?php

$cid = isset($vars[1]) ? strip_tags($vars[1]) : null;
$country = Country::findById($cid);
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => 'Study in ' . $country->getName(), 'body_class' => 'single single-ib_educator_course has-toolbar'));
$html->output('<div id="page-container">');
//$html->renderOut('site/components/toptoolbar');
$html->renderOut('site/components/header');
$html->renderOut('site/components/banner', array('country' => $country));
$html->renderOut('site/country', array('breadcrumb' => $html->render('site/components/breadcrumb', array('items' => array('Home' => uri(''), $country->getName() => false))), 'country' => $country, 'institutions' => Institution::findAllByCountryId($country->getId()), 'courses' => Course::findAllByCountryId($country->getId()), 'sidebar_right' => $html->render('site/components/sidebar_right', array('blocks' => array($html->render('site/components/sidebar_block_countries'), $html->render('site/components/sidebar_block_recent_news'), $html->render('site/components/sidebar_block_apply'))))));
$html->renderOut('site/components/countries_block', array('title' => 'Other countries to apply for', 'countries' => Country::findAllExcluding($country->getId())));
$html->renderOut('site/components/footer');
$html->output('</div>');
$html->renderOut('site/components/page_footer');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:ct21,代码行数:16,代码来源:country.php

示例5: dispatch

<?php

/** $page has already been assigned by Page module **/
// forward 404 if not published
if (!$page->getPublished()) {
    dispatch('site/404');
    exit;
}
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => $page->getTitle(), 'body_class' => 'page page-template page-template-templates page-template-full-width page-template-templatesfull-width-php has-toolbar'));
$html->output('<div id="page-container">');
//$html->renderOut('site/components/toptoolbar');
$html->renderOut('site/components/header');
$html->renderOut('site/page/default', array('breadcrumb' => $html->render('site/components/breadcrumb', array('items' => array('Home' => uri(''), $page->getTitle() => false))), 'page' => $page, 'full_page_sidebar_right' => $html->render('site/components/full_page_sidebar_right', array('blocks' => array(Block::findByName('Get in Touch'), Block::findByName('Apply Now'))))));
$html->renderOut('site/components/footer');
$html->output('</div>');
$html->renderOut('site/components/page_footer');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:ct21,代码行数:18,代码来源:default.php

示例6: isset

<?php

$page = isset($_GET['page']) ? $_GET['page'] : 1;
if (!preg_match('/^\\d+$/', $page)) {
    dispatch('core/backend/404');
    exit;
}
$settings = Vars::getSettings();
$backend_perpage = 100;
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Task list', 'zh' => '任务列表'))), true);
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$total = Queue::countAll();
$total_page = ceil($total / $backend_perpage);
$html->renderOut('queue/backend/list', array('queues' => Queue::findAllWithPage($page, $backend_perpage), 'current_page' => $page, 'total_page' => $total_page, 'total' => $total, 'pager' => $html->render('core/components/pagination', array('total' => $total_page, 'page' => $page)), 'backend_perpage' => $backend_perpage), true);
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
开发者ID:jeffreycai,项目名称:reader,代码行数:19,代码来源:list.php

示例7: sendAccountActivationEmail

 public function sendAccountActivationEmail()
 {
     $html = new HTML();
     $content;
     if (is_file(MODULESROOT . '/site/templates/email/account_activate')) {
         $content = $html->render('site/email/account_activate', array('user' => $this));
     } else {
         $content = $html->render('siteuser/email/account_activate', array('user' => $this));
     }
     sendmail(i18n(array('en' => 'Activate your account', 'zh' => '激活您的账号')), $content, $this->getEmail());
 }
开发者ID:jeffreycai,项目名称:reader,代码行数:11,代码来源:SiteUser.class.php

示例8: isset

<?php

$page = isset($_GET['page']) ? $_GET['page'] : 1;
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => 'News', 'body_class' => 'blog has-toolbar'));
$html->output('<div id="page-container">');
//$html->renderOut('site/components/toptoolbar');
$html->renderOut('site/components/header');
$perpage = $settings['news_per_page'];
$total = News::countAll();
$total_page = ceil($total / $perpage);
$html->renderOut('site/news', array('news' => News::findAllWithPage($page, $settings['news_per_page']), 'sidebar_right' => $html->render('site/components/sidebar_right', array('blocks' => array($html->render('site/components/sidebar_block_countries'), $html->render('site/components/sidebar_block_apply')))), 'current_page' => $page, 'total_page' => $total_page, 'total' => $total, 'pager' => $html->render('site/components/pagination', array('total' => $total_page, 'page' => $page)), 'start_entry' => ($page - 1) * $perpage + 1, 'end_entry' => min(array($total, $page * $perpage))));
$html->renderOut('site/components/footer');
$html->output('</div>');
$html->renderOut('site/components/page_footer');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:ct21,代码行数:16,代码来源:news.php

示例9: isset

<?php

$page = isset($_GET['page']) ? $_GET['page'] : 1;
if (!preg_match('/^\\d+$/', $page)) {
    dispatch('core/backend/404');
    exit;
}
$html = new HTML();
$html->renderOut('core/backend/html_header', array('title' => i18n(array('en' => 'Manage user', 'zh' => '管理用户'))), true);
$html->output('<div id="wrapper">');
$html->renderOut('core/backend/header');
$total = SiteUser::countAll();
$per_page = 50;
$total_page = ceil($total / $per_page);
$html->renderOut('siteuser/backend/user/list', array('users' => SiteUser::findAllWithPage($page, $per_page), 'current_page' => $page, 'total_page' => $total_page, 'total' => $total, 'pager' => $html->render('core/components/pagination', array('total' => $total_page, 'page' => $page)), 'per_page' => $per_page), true);
$html->output('</div>');
$html->renderOut('core/backend/html_footer');
exit;
开发者ID:jeffreycai,项目名称:reader,代码行数:18,代码来源:list.php

示例10: Message

        Message::register($messages);
        HTML::forward($_SERVER['HTTP_REFERER'] . '#contact-form');
    }
    // check spam
    if (module_enabled('form') && !Form::checkSpamToken('global contact form')) {
        $message = new Message(Message::DANGER, i18n(array('en' => 'Form login session expired. Please try again', 'zh' => '表单提交时限过期,请重新尝试登录')));
        Message::register($message);
        HTML::forward($_SERVER['HTTP_REFERER'] . '#contact-form');
    }
    /** success action **/
    Message::register(new Message(Message::SUCCESS, i18n(array('en' => 'Thank you for your contact ;) We will get back to you soon.', 'zh' => '感谢您的留言 ;) 我们会及时和您沟通'))));
    if (module_enabled('mail')) {
        $message = array();
        foreach ($_POST['contact'] as $key => $val) {
            $message[] = "<p><strong>{$key}</strong>:<br />" . str_replace("\n", "<br />", $val) . "</p><br />";
        }
        $message = implode("\n", $message);
        sendemailAdmin('Site contact form', $message);
    }
    HTML::forward($_SERVER['HTTP_REFERER'] . '#contact-form');
}
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => 'Contact', 'body_class' => 'page page-template page-template-templates page-template-full-width page-template-templatesfull-width-php has-toolbar'));
$html->output('<div id="page-container">');
//$html->renderOut('site/components/toptoolbar');
$html->renderOut('site/components/header');
$html->renderOut('site/contact', array('pagetitle' => $page->getTitle(), 'content' => $page->getContent(), 'googlemap' => $html->render('site/components/googlemap', array('latitude' => '-33.877348', 'longitude' => '151.2079613')), 'full_page_sidebar_right' => $html->render('site/components/full_page_sidebar_right', array('blocks' => array(Block::findByName('Get in Touch'), Block::findByName('Apply Now'))))));
$html->renderOut('site/components/footer');
$html->output('</div>');
$html->renderOut('site/components/page_footer');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:ct21,代码行数:31,代码来源:contact.php

示例11: Message

            $file = str_replace(WEBROOT . DS, "", $newname);
        }
        $rtn[] = $file;
    }
    $object->setIeltsTranscripts(implode("\n", $rtn));
    $object->setCreatedAt(time());
    if ($error_flag == false) {
        if ($object->save()) {
            Message::register(new Message(Message::SUCCESS, i18n(array("en" => "Thanks for your application. We will come back to you as soon as possible.", "zh" => "记录保存成功"))));
            sendemailAdmin('Apply for course', '<p>A new application for course has just been submitted: <br /><a href="http://en.ct21.com.au/admin/application/edit/' . $object->getId() . '">http://en.ct21.com.au/admin/application/edit/' . $object->getId() . '</a></p>');
            HTML::forwardBackToReferer();
        } else {
            Message::register(new Message(Message::DANGER, i18n(array("en" => "Record failed to save", "zh" => "记录保存失败"))));
        }
    }
}
// bootstrap field widgets
FormWidgetPlupfile::bootstrap('graduation_certificate');
FormWidgetPlupfile::bootstrap('degree_certificate');
FormWidgetPlupfile::bootstrap('academic_transcripts');
FormWidgetPlupfile::bootstrap('ielts_transcripts');
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => 'Apply for a course', 'body_class' => 'page page-template page-template-templates page-template-full-width page-template-templatesfull-width-php has-toolbar'));
$html->output('<div id="page-container">');
//$html->renderOut('site/components/toptoolbar');
$html->renderOut('site/components/header');
$html->renderOut('site/apply_form', array('object' => new Application(), 'full_page_sidebar_right' => $html->render('site/components/full_page_sidebar_right', array('blocks' => array(Block::findByName('Get in Touch'))))));
$html->renderOut('site/components/footer');
$html->output('</div>');
$html->renderOut('site/components/page_footer');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:ct21,代码行数:31,代码来源:apply_form.php

示例12: isset

<?php

$id = isset($vars[1]) ? $vars[1] : null;
$course = Course::findById($id);
$country = $course->getCountry();
if (is_null($course)) {
    dispatch('site/404');
    exit;
}
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => 'Course - ' . $course->getTitle(), 'body_class' => 'single single-ib_educator_course has-toolbar'));
$html->output('<div id="page-container">');
//$html->renderOut('site/components/toptoolbar');
$html->renderOut('site/components/header');
$html->renderOut('site/course', array('breadcrumb' => $html->render('site/components/breadcrumb', array('items' => array('Home' => uri(''), $country->getName() => uri('country/' . $country->getId()), $course->getTitle() => false))), 'course' => $course, 'sidebar_right' => $html->render('site/components/sidebar_right', array('blocks' => array($html->render('site/components/sidebar_block_courses', array('course' => $course)), $html->render('site/components/sidebar_block_recent_news'), $html->render('site/components/sidebar_block_apply'))))));
$html->renderOut('site/components/footer');
$html->output('</div>');
$html->renderOut('site/components/page_footer');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:ct21,代码行数:19,代码来源:course.php

示例13: berechtigungen

 public function berechtigungen()
 {
     $this->current = Modules::getModule($this->request->id);
     $this->aktionen = [];
     Routing::resetBreadcrumbs();
     Routing::addBreadcrumb('Module', '/ModView/showModules');
     Routing::addBreadcrumb($this->current->namespace);
     foreach ($this->current->getAllActions() as $action) {
         if ($action->securityLevel === Action::LEVEL_CONFIG) {
             $linkEdit = new HTML('a');
             $linkEdit->addAttribute('href', Routing::appLink('modView', 'berechtigung', array('current' => $this->current->qualifiedName, 'id' => $action->name)));
             $linkEdit->text('Berechtigungen &raquo;');
             $linkEdit->css('nfs-modal');
             $temp = array('name' => $action->name, 'description' => $action->description, 'berechtigung' => $linkEdit->render());
             if ($action->addToMenu) {
                 $temp['menu'] = 'Ja';
             } else {
                 $temp['menu'] = 'Nein';
             }
             $this->aktionen[] = $temp;
         }
     }
 }
开发者ID:new-frontiers,项目名称:nostromo-module-modview,代码行数:23,代码来源:ModViewController.php

示例14: isset

<?php

/** access control **/
require_login();
require_permission('管理自己的客户');
/** prepare vars **/
$myuser = MySiteUser::getCurrentUser();
$page = isset($_GET['page']) ? strip_tags($_GET['page']) : 1;
/** presentation **/
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => '列表', 'body_class' => 'client_list'));
$html->renderOut('site/components/mainnav', array('user' => $myuser));
$html->output('<div id="page-wrapper" class="gray-bg">');
$html->renderOut('site/components/topnav', array('user' => $myuser));
$html->renderOut('site/components/page_header', array('title' => '列表', 'breadcrumb' => array('首页' => uri(''), '客户管理' => '#', '列表' => '#')));
$perpage = 50;
$total = has_permission('管理所有客户') ? Client::countAll() : Client::countAll($myuser->getCompanyId());
$total_page = ceil($total / $perpage);
$html->renderOut('site/client_list', array('user' => $myuser, 'objects' => has_permission('管理所有客户') ? Client::findAllWithPage($page, $perpage) : Client::findAllWithPage($page, $perpage, $myuser->getCompanyId()), 'current_page' => $page, 'total_page' => $total_page, 'total' => $total, 'pager' => $html->render('core/components/pagination', array('total' => $total_page, 'page' => $page)), 'start_entry' => ($page - 1) * $perpage + 1, 'end_entry' => min(array($total, $page * $perpage))));
$html->output('</div>');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:chaoliu,代码行数:21,代码来源:client_list.php

示例15: isset

<?php

$nid = isset($vars[1]) ? strip_tags($vars[1]) : null;
$news = News::findById($nid);
$html = new HTML();
$html->renderOut('site/components/html_header', array('title' => $news->getTitle(), 'body_class' => 'single single-post single-format-standard has-toolbar'));
$html->output('<div id="page-container">');
//$html->renderOut('site/components/toptoolbar');
$html->renderOut('site/components/header');
$html->renderOut('site/news_single', array('news' => $news, 'sidebar_right' => $html->render('site/components/sidebar_right', array('blocks' => array($html->render('site/components/sidebar_block_countries'), $html->render('site/components/sidebar_block_recent_news'), $html->render('site/components/sidebar_block_apply'))))));
$html->renderOut('site/components/footer');
$html->output('</div>');
$html->renderOut('site/components/page_footer');
$html->renderOut('site/components/html_footer');
开发者ID:jeffreycai,项目名称:ct21,代码行数:14,代码来源:news_single.php


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