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


PHP html_writer::start_div方法代码示例

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


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

示例1: array

} else {
    // Create a form.
    echo html_writer::start_tag('form', array('method' => 'post', 'action' => 'custom_toolbar_example.php'));
    echo html_writer::start_div();
    // Basic editor options.
    $options = array();
    $atto = new atto_texteditor();
    // Normal Atto.
    echo html_writer::start_div('normaldiv');
    echo $OUTPUT->heading('Normal Atto');
    echo html_writer::div(html_writer::tag('textarea', '', array('id' => 'normaleditor', 'name' => 'normaleditor', 'rows' => 10)));
    $atto->use_editor('normaleditor', $options);
    echo html_writer::end_div();
    // Second Atto with custom options.
    echo html_writer::start_div('specialdiv');
    $options['atto:toolbar'] = <<<EOT
style1 = bold, italic
list = unorderedlist, orderedlist
EOT;
    echo $OUTPUT->heading('Special Atto');
    echo html_writer::div(html_writer::tag('textarea', '', array('id' => 'specialeditor', 'name' => 'specialeditor', 'rows' => 10)));
    $atto->use_editor('specialeditor', $options);
    echo html_writer::end_div();
    // Button to submit form.
    echo html_writer::start_div('', array('style' => 'margin-top: 20px'));
    echo html_writer::tag('button', 'Submit and see the HTML');
    echo html_writer::end_div();
    echo html_writer::end_div();
    echo html_writer::end_tag('form');
}
echo $OUTPUT->footer();
开发者ID:evltuma,项目名称:moodle,代码行数:31,代码来源:custom_toolbar_example.php

示例2: display_options_adv

 /**
  * Print HTML to display the "Also show old questions" checkbox
  */
 public function display_options_adv()
 {
     echo \html_writer::start_div();
     echo \html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'showhidden', 'value' => '0', 'id' => 'showhidden_off'));
     echo \html_writer::checkbox('showhidden', '1', !$this->hide, get_string('showhidden', 'question'), array('id' => 'showhidden_on', 'class' => 'searchoptions'));
     echo \html_writer::end_div() . "\n";
 }
开发者ID:evltuma,项目名称:moodle,代码行数:10,代码来源:hidden_condition.php

示例3: edit_page

    /**
     * Render the edit page
     *
     * @param \quiz $quizobj object containing all the quiz settings information.
     * @param structure $structure object containing the structure of the quiz.
     * @param \question_edit_contexts $contexts the relevant question bank contexts.
     * @param \moodle_url $pageurl the canonical URL of this page.
     * @param array $pagevars the variables from {@link question_edit_setup()}.
     * @return string HTML to output.
     */
    public function edit_page(\quiz $quizobj, structure $structure,
            \question_edit_contexts $contexts, \moodle_url $pageurl, array $pagevars) {
        $output = '';

        // Page title.
        $output .= $this->heading_with_help(get_string('editingquizx', 'quiz',
                format_string($quizobj->get_quiz_name())), 'editingquiz', 'quiz', '',
                get_string('basicideasofquiz', 'quiz'), 2);

        // Information at the top.
        $output .= $this->quiz_state_warnings($structure);
        $output .= $this->quiz_information($structure);
        $output .= $this->maximum_grade_input($structure, $pageurl);
        $output .= $this->repaginate_button($structure, $pageurl);
        $output .= $this->total_marks($quizobj->get_quiz());

        // Show the questions organised into sections and pages.
        $output .= $this->start_section_list($structure);

        foreach ($structure->get_sections() as $section) {
            $output .= $this->start_section($structure, $section);
            $output .= $this->questions_in_section($structure, $section, $contexts, $pagevars, $pageurl);

            if ($structure->is_last_section($section)) {
                $output .= \html_writer::start_div('last-add-menu');
                $output .= html_writer::tag('span', $this->add_menu_actions($structure, 0,
                        $pageurl, $contexts, $pagevars), array('class' => 'add-menu-outer'));
                $output .= \html_writer::end_div();
            }

            $output .= $this->end_section();
        }

        $output .= $this->end_section_list();

        // Initialise the JavaScript.
        $this->initialise_editing_javascript($structure, $contexts, $pagevars, $pageurl);

        // Include the contents of any other popups required.
        if ($structure->can_be_edited()) {
            $popups = '';

            $popups .= $this->question_bank_loading();
            $this->page->requires->yui_module('moodle-mod_quiz-quizquestionbank',
                    'M.mod_quiz.quizquestionbank.init',
                    array('class' => 'questionbank', 'cmid' => $structure->get_cmid()));

            $popups .= $this->random_question_form($pageurl, $contexts, $pagevars);
            $this->page->requires->yui_module('moodle-mod_quiz-randomquestion',
                    'M.mod_quiz.randomquestion.init');

            $output .= html_writer::div($popups, 'mod_quiz_edit_forms');

            // Include the question chooser.
            $output .= $this->question_chooser();
            $this->page->requires->yui_module('moodle-mod_quiz-questionchooser', 'M.mod_quiz.init_questionchooser');
        }

        return $output;
    }
开发者ID:JuliaGolutvina,项目名称:moodle,代码行数:70,代码来源:edit_renderer.php

示例4: detail_pair

 /**
  * Renderers a key value pair of information for display.
  *
  * @param string $key
  * @param string $value
  * @param string $class
  * @return string
  */
 protected function detail_pair($key, $value, $class = '')
 {
     $html = html_writer::start_div('detail-pair row yui3-g ' . preg_replace('#[^a-zA-Z0-9_\\-]#', '-', $class));
     $html .= html_writer::div(html_writer::span($key), 'pair-key span4 yui3-u-1-4');
     $html .= html_writer::div(html_writer::span($value), 'pair-value span8 yui3-u-3-4');
     $html .= html_writer::end_div();
     return $html;
 }
开发者ID:igormateus,项目名称:moodle-theme_essential,代码行数:16,代码来源:core_course_management_renderer.php

示例5: detail_pair

 protected function detail_pair($key, $value, $class = '')
 {
     $html = html_writer::start_div('detail-pair row ' . preg_replace('#[^a-zA-Z0-9_\\-]#', '-', $class));
     $html .= html_writer::div(html_writer::span($key), 'pair-key col-sm-3');
     $html .= html_writer::div(html_writer::span($value), 'pair-value col-sm-9');
     $html .= html_writer::end_div();
     return $html;
 }
开发者ID:adonm,项目名称:learning,代码行数:8,代码来源:course_management.php

示例6: start_html

 /**
  * Starts to output progress.
  *
  * Called in constructor and in update_progress if required.
  *
  * @throws \coding_exception If already started
  */
 public function start_html()
 {
     if ($this->bar) {
         throw new \coding_exception('Already started');
     }
     $this->bar = new \progress_bar();
     $this->bar->create();
     echo \html_writer::start_div('wibbler');
 }
开发者ID:evltuma,项目名称:moodle,代码行数:16,代码来源:display.php

示例7: log_display

 /**
  * The backup and restore pages may display a log (if any) in a scrolling box.
  *
  * @param string $loghtml Log content in HTML format
  * @return string HTML content that shows the log
  */
 public function log_display($loghtml)
 {
     global $OUTPUT;
     $out = html_writer::start_div('backup_log');
     $out .= $OUTPUT->heading(get_string('backuplog', 'backup'));
     $out .= html_writer::start_div('backup_log_contents');
     $out .= $loghtml;
     $out .= html_writer::end_div();
     $out .= html_writer::end_div();
     return $out;
 }
开发者ID:covex-nn,项目名称:moodle,代码行数:17,代码来源:renderer.php

示例8: render_library_content

 public function render_library_content($config, $id)
 {
     $this->page->requires->js('/blocks/library/module.js');
     $html = html_writer::start_div('library-block');
     // Build the Header.
     $headerimage = html_writer::empty_tag('img', array('src' => '/blocks/library/pix/library-banner.jpg'));
     $header = html_writer::link(get_string('universityhomelink', 'block_library'), $headerimage, array('target' => '_blank'));
     $header .= html_writer::link(get_string('libraryloginlink', 'block_library'), get_string('librarylogin', 'block_library'), array('class' => 'my-account', 'target' => '_blank'));
     // Library search.
     if (empty($config) || $config->enablesearch == 1) {
         $search = '';
         $search .= html_writer::start_tag('form', array('onsubmit' => 'return M.block_library.ebscoHostSearchGo(this);', 'id' => 'ebscohostCustomSearchBox', 'class' => 'searcher', 'name' => 'ebscoSearch', 'method' => 'post'));
         $search .= html_writer::tag('input', '', array('id' => 'ebscohostwindow', 'name' => 'ebscohostwindow', 'type' => 'hidden', 'value' => '0'));
         $search .= html_writer::tag('input', '', array('id' => 'ebscohosturl', 'name' => 'ebscohosturl', 'type' => 'hidden', 'value' => get_string('ebscohosturl', 'block_library')));
         $search .= html_writer::tag('input', '', array('id' => 'ebscohostsearchsrc', 'name' => 'ebscohostsearchsrc', 'type' => 'hidden', 'value' => 'db'));
         $search .= html_writer::tag('input', '', array('id' => 'ebscohostsearchmode', 'name' => 'ebscohostsearchmode', 'type' => 'hidden', 'value' => '+'));
         $search .= html_writer::tag('input', '', array('id' => 'ebscohostkeywords', 'name' => 'ebscohostkeywords', 'type' => 'hidden'));
         $search .= html_writer::tag('input', '', array('id' => 'oversizeNiceInput', 'name' => 'ebscohostsearchtext', 'type' => 'text', 'class' => 'oversize input-text front', 'title' => get_string('searchtip', 'block_library'), 'placeholder' => get_string('findbooks', 'block_library')));
         $search .= html_writer::tag('button', get_string('searchbuttontext', 'block_library'), array('type' => 'submit', 'value' => 'Search', 'class' => 'lib_button mleft', 'onclick' => '_gaq.push([\'_trackEvent\', \'eds\', \'clicked\'])'));
         $search .= html_writer::end_tag('form');
     }
     $html .= $header;
     $html .= $search;
     //  Library Links.
     if (empty($config) || $config->enablelibrarylinks == 1) {
         $llinks = '';
         $llinks .= html_writer::tag('div', get_string('library_links', 'block_library'), array('class' => 'library-links'));
         $html .= $llinks;
     }
     // Course links.
     if (!empty($config->enablecourselinks) && $config->enablecourselinks == 1 && !empty($config->rawhtml['text'])) {
         $clinks = '';
         $clinks .= html_writer::start_tag('div');
         $clinks .= html_writer::tag('p', get_string('librarycourse', 'block_library'), array('class' => 'library-coursetitle'));
         $clinks .= $config->rawhtml['text'];
         $clinks .= html_writer::end_tag('div');
         $html .= $clinks;
     }
     // Build the footer content.
     $listitems = array();
     $askcontent = '';
     if (empty($config) || $config->enableaskbubble == 1) {
         $listitems[] = html_writer::link(get_string('asklibrarystafflink', 'block_library'), get_string('asklibrarystaff', 'block_library'), array('class' => 'ask-main', 'target' => '_blank'));
         $listitems[] = html_writer::link(get_string('asklibrarystafflink', 'block_library'), get_string('textstaff', 'block_library'), array('target' => '_blank'));
         $listitems[] = html_writer::link(get_string('chatwithstafflink', 'block_library'), get_string('chatwithstaff', 'block_library'), array('target' => '_blank'));
         $listitems[] = html_writer::link(get_string('emailstafflink', 'block_library'), get_string('emailstaff', 'block_library'), array('target' => '_blank'));
         $listitems[] = html_writer::link(get_string('asklibrarystafflink', 'block_library'), get_string('phonestaff', 'block_library'), array('class' => 'last', 'target' => '_blank'));
         $askcontent = html_writer::alist($listitems, array('class' => 'ask'));
     }
     $footer = html_writer::tag('div', $askcontent, array('class' => 'library-bottom'));
     $html .= $footer;
     $html .= html_writer::end_div();
     return $html;
 }
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:54,代码来源:renderer.php

示例9: full_header

 public function full_header()
 {
     $html = html_writer::start_tag('header', array('id' => 'page-header', 'class' => 'clearfix'));
     $html .= html_writer::start_div('clearfix', array('id' => 'page-navbar'));
     $html .= html_writer::tag('nav', $this->navbar(), array('class' => 'breadcrumb-nav'));
     $html .= html_writer::div($this->page_heading_button(), 'breadcrumb-button');
     $html .= html_writer::end_div();
     $html .= html_writer::tag('div', $this->course_header(), array('id' => 'course-header'));
     $html .= html_writer::end_tag('header');
     return $html;
 }
开发者ID:xow,项目名称:moodle-theme_shiny,代码行数:11,代码来源:core_renderer.php

示例10: search_form

 public function search_form(moodle_url $formtarget, $searchvalue)
 {
     $content = html_writer::start_tag('form', array('class' => 'adminsearchform', 'method' => 'get', 'action' => $formtarget, 'role' => 'search'));
     $content .= html_writer::start_div('input-group');
     $content .= html_writer::empty_tag('input', array('id' => 'adminsearchquery', 'type' => 'text', 'name' => 'query', 'class' => 'form-control', 'placeholder' => s(get_string('searchinsettings', 'admin')), 'value' => s($searchvalue)));
     $content .= html_writer::start_span('input-group-btn');
     $content .= html_writer::tag('button', s(get_string('go')), array('type' => 'button', 'class' => 'btn btn-default'));
     $content .= html_writer::end_span();
     $content .= html_writer::end_div();
     $content .= html_writer::end_tag('form');
     return $content;
 }
开发者ID:noelchavez,项目名称:moodle-theme_elegance,代码行数:12,代码来源:block_settings_renderer.php

示例11: eclass_header

 public function eclass_header($columns)
 {
     global $CFG, $SITE;
     $output = html_writer::start_tag('header', array("role" => "banner", "class" => "navbar navbar-fixed-top moodle-has-zindex"));
     $output .= html_writer::start_tag('nav', array("role" => "navigation", "class" => "navbar-inner"));
     $output .= html_writer::start_div("container-fluid");
     $output .= html_writer::tag('img', '', array("src" => $this->pix_url('ua-logo', 'theme'), "class" => "uofa-logo", "height" => "40px"));
     $output .= html_writer::link($CFG->wwwroot, $SITE->shortname, array("class" => "brand"));
     $output .= html_writer::end_div();
     $output .= html_writer::end_tag('nav');
     $output .= html_writer::end_tag('header');
     return $output;
 }
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:13,代码来源:core_renderer_maintenance.php

示例12: edit_page

 /**
  * Render the edit page
  *
  * @param \offlinequiz $offlinequizobj object containing all the offlinequiz settings information.
  * @param structure $structure object containing the structure of the offlinequiz.
  * @param \question_edit_contexts $contexts the relevant question bank contexts.
  * @param \moodle_url $pageurl the canonical URL of this page.
  * @param array $pagevars the variables from {@link question_edit_setup()}.
  * @return string HTML to output.
  */
 public function edit_page(\offlinequiz $offlinequizobj, structure $structure, \question_edit_contexts $contexts, \moodle_url $pageurl, array $pagevars, array $groupletters)
 {
     $offlinequiz = $offlinequizobj->get_offlinequiz();
     $output = '';
     // Page title.
     $output .= $this->heading_with_help(get_string('editingofflinequizx', 'offlinequiz', format_string($offlinequizobj->get_offlinequiz_name())) . ' (' . get_string('group', 'offlinequiz') . ' ' . $groupletters[$offlinequiz->groupnumber] . ') ', 'editingofflinequiz', 'offlinequiz', '', get_string('basicideasofofflinequiz', 'offlinequiz'), 2);
     // Information at the top.
     $output .= $this->offlinequiz_group_selector($offlinequiz, $pageurl);
     $output .= $this->offlinequiz_information($structure);
     $output .= $this->maximum_grade_input($offlinequiz, $this->page->url);
     $output .= $this->offlinequiz_state_warnings($structure);
     $output .= $this->repaginate_button($structure, $pageurl, $offlinequiz);
     $output .= $this->total_marks($offlinequiz);
     // Start form for question checkboxes
     $output .= $this->start_add_to_group_form($offlinequiz, $pageurl);
     // Add buttons for adding selected to another group and for removing selected.
     $output .= $this->add_to_group_button($structure, $offlinequiz, $pageurl);
     $output .= $this->remove_selected_button($structure, $offlinequiz, $pageurl);
     $output .= $this->select_all_links($structure);
     // Show the questions organised into sections and pages.
     $output .= $this->start_section_list();
     $sections = $structure->get_offlinequiz_sections();
     $lastsection = end($sections);
     foreach ($sections as $section) {
         $output .= $this->start_section($section);
         $output .= $this->questions_in_section($structure, $section, $contexts, $pagevars, $pageurl);
         if ($section === $lastsection) {
             $output .= \html_writer::start_div('last-add-menu');
             $output .= html_writer::tag('span', $this->add_menu_actions($structure, 0, $pageurl, $contexts, $pagevars), array('class' => 'add-menu-outer'));
             $output .= \html_writer::end_div();
         }
         $output .= $this->end_section();
     }
     $output .= $this->end_section_list();
     $output .= $this->end_add_to_group_form();
     // Inialise the JavaScript.
     $this->initialise_editing_javascript($offlinequizobj->get_course(), $offlinequizobj->get_offlinequiz(), $structure, $contexts, $pagevars, $pageurl);
     // Include the contents of any other popups required.
     if ($structure->can_be_edited()) {
         $popups = '';
         $popups .= $this->question_bank_loading();
         $this->page->requires->yui_module('moodle-mod_offlinequiz-offlinequizquestionbank', 'M.mod_offlinequiz.offlinequizquestionbank.init', array('class' => 'questionbank', 'cmid' => $structure->get_cmid()));
         $popups .= $this->random_question_form($pageurl, $contexts, $pagevars);
         $this->page->requires->yui_module('moodle-mod_offlinequiz-randomquestion', 'M.mod_offlinequiz.randomquestion.init');
         $output .= html_writer::div($popups, 'mod_offlinequiz_edit_forms');
         // Include the question chooser.
         $output .= $this->question_chooser();
         $this->page->requires->yui_module('moodle-mod_offlinequiz-questionchooser', 'M.mod_offlinequiz.init_questionchooser');
     }
     return $output;
 }
开发者ID:frankkoch,项目名称:moodle-mod_offlinequiz,代码行数:61,代码来源:edit_renderer.php

示例13: start_html

 /**
  * Starts displaying the progress bar, with optional heading and a special
  * div so it can be hidden later.
  *
  * @see \core\progress\display::start_html()
  */
 public function start_html()
 {
     global $OUTPUT;
     $this->id = 'core_progress_display_if_slow' . self::$nextid;
     self::$nextid++;
     // Containing div includes a CSS class so that it can be themed if required,
     // and an id so it can be automatically hidden at end.
     echo \html_writer::start_div('core_progress_display_if_slow', array('id' => $this->id));
     // Display optional heading.
     if ($this->heading !== '') {
         echo $OUTPUT->heading($this->heading, 3);
     }
     // Use base class to display progress bar.
     parent::start_html();
 }
开发者ID:evltuma,项目名称:moodle,代码行数:21,代码来源:display_if_slow.php

示例14: eclass_header

 public function eclass_header($columns)
 {
     global $CFG, $SITE;
     $output = html_writer::start_tag('header', array("role" => "banner", "class" => "navbar navbar-fixed-top moodle-has-zindex"));
     $output .= html_writer::start_tag('nav', array("role" => "navigation", "class" => "navbar-inner"));
     $output .= html_writer::start_div("container-fluid");
     $output .= html_writer::tag('img', '', array("src" => $this->pix_url('ua-logo', 'theme'), "class" => "uofa-logo", "height" => "40px"));
     $output .= html_writer::div(html_writer::link($CFG->wwwroot, $SITE->shortname, array("class" => "brand")), 'nav-brand');
     $output .= html_writer::start_div("pull-right");
     $output .= $this->custom_menu();
     $headingmenu = $this->page_heading_menu();
     $output .= html_writer::alist(array($headingmenu), array("class" => "nav pull-right"));
     $output .= html_writer::div(html_writer::span('', "glyphicons collapse_top"), "scroll-top pull-right", array("title" => "Scroll to top"));
     $output .= $this->login_info();
     $output .= html_writer::end_div();
     $output .= html_writer::end_div();
     $output .= html_writer::end_tag('nav');
     // Mobile stuff.
     $toggleleft = '<li><label class="toggle toggle-navigation"   for="toggle-left" onclick>' . '<div class="mobile-nav-icon glyphicons list"></div><span>Navigation</span></label></li>';
     $togglecenter = '<li><label class="toggle toggle-content" for="toggle-center" onclick>' . '<div class="mobile-nav-icon glyphicons book"></div><span>Content</span></label></li>';
     $toggleright = '';
     if ($this->page->blocks->region_has_content('side-post', $this)) {
         $toggleright = '<li><label class="toggle toggle-blocks"  for="toggle-right" onclick>' . '<div class="mobile-nav-icon glyphicons show_big_thumbnails"></div><span>Blocks</span></label></li>';
     }
     $toggleprofile = '<li><label class="toggle toggle-profile"  for="toggle-profile" onclick>' . '<div class="mobile-nav-icon glyphicons user"></div><span>Profile</span></label></li>';
     switch ($columns) {
         default:
         case 1:
             $togglelist = $togglecenter . $toggleprofile;
             break;
         case 2:
             $togglelist = $toggleleft . $togglecenter . $toggleprofile;
             break;
         case 3:
             $togglelist = $toggleleft . $togglecenter . $toggleright . $toggleprofile;
             break;
     }
     $togglelist .= html_writer::div('', 'active-indicator');
     $output .= html_writer::start_tag('nav', array("class" => "mobile-nav"));
     $output .= html_writer::tag('ul', $togglelist, array("class" => "view-selector"));
     $output .= html_writer::end_tag('nav');
     $output .= html_writer::end_tag('header');
     return $output;
 }
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:44,代码来源:core_renderer.php

示例15: render_event_list

 /**
  * Renders the event list page with filter form and datatable.
  *
  * @param eventfilter_form $form Event filter form.
  * @param array $tabledata An array of event data to be used by the datatable.
  * @return string HTML to be displayed.
  */
 public function render_event_list($form, $tabledata)
 {
     global $PAGE;
     $title = get_string('pluginname', 'report_eventlist');
     // Header.
     $html = $this->output->header();
     $html .= $this->output->heading($title);
     // Form.
     ob_start();
     $form->display();
     $html .= ob_get_contents();
     ob_end_clean();
     $PAGE->requires->yui_module('moodle-report_eventlist-eventfilter', 'Y.M.report_eventlist.EventFilter.init', array(array('tabledata' => $tabledata)));
     $PAGE->requires->strings_for_js(array('eventname', 'component', 'action', 'crud', 'edulevel', 'affectedtable', 'dname', 'legacyevent', 'since'), 'report_eventlist');
     $html .= html_writer::start_div('report-eventlist-data-table', array('id' => 'report-eventlist-table'));
     $html .= html_writer::end_div();
     $html .= $this->output->footer();
     return $html;
 }
开发者ID:evltuma,项目名称:moodle,代码行数:26,代码来源:renderer.php


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