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


PHP html_writer::end_tag方法代码示例

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


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

示例1: render_section_links

 /**
  * Render a series of section links.
  *
  * @param stdClass $course The course we are rendering for.
  * @param array $sections An array of section objects to render.
  * @param bool|int The section to provide a jump to link for.
  * @return string The HTML to display.
  */
 public function render_section_links(stdClass $course, array $sections, $jumptosection = false)
 {
     $html = html_writer::start_tag('ol', array('class' => 'inline-list'));
     foreach ($sections as $section) {
         $attributes = array();
         if (!$section->visible) {
             $attributes['class'] = 'dimmed';
         }
         $html .= html_writer::start_tag('li');
         $sectiontext = $section->section;
         if ($section->highlight) {
             $sectiontext = html_writer::tag('strong', $sectiontext);
         }
         $html .= html_writer::link(course_get_url($course, $section->section), $sectiontext, $attributes);
         $html .= html_writer::end_tag('li') . ' ';
     }
     $html .= html_writer::end_tag('ol');
     if ($jumptosection && isset($sections[$jumptosection])) {
         if ($course->format == 'weeks') {
             $linktext = new lang_string('jumptocurrentweek', 'block_section_links');
         } else {
             if ($course->format == 'topics') {
                 $linktext = new lang_string('jumptocurrenttopic', 'block_section_links');
             }
         }
         $attributes = array();
         if (!$sections[$jumptosection]->visible) {
             $attributes['class'] = 'dimmed';
         }
         $html .= html_writer::link(course_get_url($course, $jumptosection), $linktext, $attributes);
     }
     return $html;
 }
开发者ID:evltuma,项目名称:moodle,代码行数:41,代码来源:renderer.php

示例2: render_stepsdefinitions

 /**
  * Renders the list of available steps according to the submitted filters
  *
  * @param string     $stepsdefinitions HTML from behat with the available steps
  * @param moodleform $form
  * @return string HTML code
  */
 public function render_stepsdefinitions($stepsdefinitions, $form)
 {
     $title = get_string('pluginname', 'tool_behat');
     // Header.
     $html = $this->output->header();
     $html .= $this->output->heading($title);
     // Info.
     $installurl = behat_command::DOCS_URL . '#Installation';
     $installlink = html_writer::tag('a', $installurl, array('href' => $installurl, 'target' => '_blank'));
     $writetestsurl = behat_command::DOCS_URL . '#Writting_features';
     $writetestslink = html_writer::tag('a', $writetestsurl, array('href' => $writetestsurl, 'target' => '_blank'));
     $writestepsurl = behat_command::DOCS_URL . '#Adding_steps_definitions';
     $writestepslink = html_writer::tag('a', $writestepsurl, array('href' => $writestepsurl, 'target' => '_blank'));
     $infos = array(get_string('installinfo', 'tool_behat', $installlink), get_string('newtestsinfo', 'tool_behat', $writetestslink), get_string('newstepsinfo', 'tool_behat', $writestepslink));
     // List of steps
     $html .= $this->output->box_start();
     $html .= html_writer::tag('h1', 'Info');
     $html .= html_writer::empty_tag('div');
     $html .= html_writer::empty_tag('ul');
     $html .= html_writer::empty_tag('li');
     $html .= implode(html_writer::end_tag('li') . html_writer::empty_tag('li'), $infos);
     $html .= html_writer::end_tag('li');
     $html .= html_writer::end_tag('ul');
     $html .= html_writer::end_tag('div');
     $html .= $this->output->box_end();
     // Form.
     ob_start();
     $form->display();
     $html .= ob_get_contents();
     ob_end_clean();
     // Steps definitions.
     $html .= html_writer::tag('div', $stepsdefinitions, array('class' => 'steps-definitions'));
     $html .= $this->output->footer();
     return $html;
 }
开发者ID:Burick,项目名称:moodle,代码行数:42,代码来源:renderer.php

示例3: commenthtmlform

 function commenthtmlform($loginuserid = '') {
        $popup = html_writer:: start_tag('div',array('id'=>"basicModal$loginuserid",'style'=>'display:none;'));
        $popup .= html_writer:: tag('h4','Add Comment',array('class'=>'formheading'));
        $popup .= html_writer:: start_tag('form',array('name'=>'commentsform','onsubmit'=>'mycommentpopupform('.$loginuserid.')','action'=>''));
        //$popup .= html_writer:: empty_tag('input',array('type'=>'hidden','name'=>'queryid'));
        $popup .= html_writer:: start_tag('div',array('class'=>'summerylabel'));
        $popup .= html_writer:: tag('label','Summery',array('for'=>'summery'));
        
        $popup .= html_writer:: start_tag('span',array('class'=>'summerytextbox'));
        $popup .= html_writer:: empty_tag('input',array('type'=>'text','name'=>'summery','class'=>'textbox'));
        $popup .= html_writer:: end_tag('span');
        
        $popup .= html_writer:: end_tag('div');
        
        $popup .= html_writer:: start_tag('div',array('class'=>'summerylabel'));
        
        $popup .= html_writer:: tag('label','Comment',array('for'=>'comment'));
        
        $popup .= html_writer:: start_tag('span',array('class'=>'summerytextbox'));
        $popup .= html_writer:: tag('textarea','comment',array('class'=>'commentfield'));
        $popup .= html_writer:: end_tag('span');
        
        $popup .= html_writer:: end_tag('div');
        
        $popup .= html_writer:: start_tag('div',array('class'=>'submitbutton'));
        $popup .= html_writer:: empty_tag('input',array('type'=>'submit','name'=>'summery','value'=>'submit'));
        $popup .= html_writer:: end_tag('div');
        $popup .= html_writer:: end_tag('form');
        
        $popup .= html_writer:: end_tag('div');
        return $popup;
      }
开发者ID:anilch,项目名称:Personel,代码行数:32,代码来源:renderer.php

示例4: get_content

 function get_content()
 {
     global $CFG, $OUTPUT, $USER;
     $id = optional_param('id', NULL, PARAM_INT);
     if ($this->content !== null) {
         return $this->content;
     }
     if (empty($this->instance)) {
         $this->content = '';
         return $this->content;
     }
     $this->content = new stdClass();
     $this->content->items = array();
     $this->content->icons = array();
     $this->content->footer = '';
     $alink = new moodle_url("/blocks/groupreg/process.php", array("id" => $id));
     $o = "";
     $o .= html_writer::start_tag('div');
     $o .= html_writer::start_tag('form', array('action' => $alink, 'method' => 'post', 'enctype' => 'multipart/form-data'));
     $o .= html_writer::start_tag('div');
     $o .= html_writer::empty_tag('input', array('type' => 'file', 'name' => 'file_csv', 'value' => ''));
     $o .= html_writer::end_tag('div');
     $o .= html_writer::start_tag('div');
     $o .= html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('upload')));
     $o .= $OUTPUT->help_icon('pluginname', 'block_groupreg');
     $o .= html_writer::end_tag('div');
     $o .= html_writer::end_tag('form');
     $o .= html_writer::end_tag('div');
     if ($USER->id != 2) {
         return false;
     }
     $this->content->text .= $o;
     return $this->content;
 }
开发者ID:e-rasvet,项目名称:groupreg,代码行数:34,代码来源:block_groupreg.php

示例5: modify_questionresults_duringquiz

 /**
  * Updating output to include javascript to initiate a lightbox effect on drawing type questions
  * so that the images are smaller unless clicked on for review
  *
  * @param \mod_activequiz\activequiz_question $question The realtime quiz question
  * @param array                               $attempts An array of \mod_activequiz\activequiz_attempt classes
  * @param string                              $output The current output from getting the results
  * @return string Return the updated output to be passed to the client
  */
 public function modify_questionresults_duringquiz($question, $attempts, $output)
 {
     global $DB;
     // if no attempts just return the output
     if (empty($attempts)) {
         return $output;
     }
     // get the question definition to determine response format
     reset($attempts);
     $attempt = current($attempts);
     /** @var \mod_activequiz\activequiz_attempt $attempt */
     $quba = $attempt->get_quba();
     $slot = $attempt->get_question_slot($question);
     $qa = $quba->get_question_attempt($slot);
     // now get question definition
     $questiondef = $qa->get_question();
     if ($questiondef->responseformat == 'picture') {
         // if the response format is a picture, meaning drawing type add the js for lightbox stuff
         $picturejs = \html_writer::start_tag('script', array('type' => 'text/javascript', 'id' => 'poodllrecording_js'));
         $picturejs .= '
             activequiz.questionmodifiers.poodllrecording.lightbox_images();
         ';
         $picturejs .= \html_writer::end_tag('script');
         $newoutput = $output . $picturejs;
         $newoutput = \html_writer::div($newoutput, '', array('id' => 'poodllrecording-picture'));
     } else {
         $newoutput = $output;
     }
     return $newoutput;
 }
开发者ID:agarnav,项目名称:moodle-mod_activequiz,代码行数:39,代码来源:poodllrecording.php

示例6: construct_ablock_select

 private function construct_ablock_select(question_attempt $qa, question_display_options $options)
 {
     $question = $qa->get_question();
     $response = $qa->get_last_qt_data();
     $stemorder = $question->get_stem_order();
     $choices = $this->format_choices($question);
     $o = html_writer::start_tag('table', array('class' => 'answer'));
     $o .= html_writer::start_tag('tbody');
     $parity = 0;
     foreach ($stemorder as $key => $stemid) {
         $o .= html_writer::start_tag('tr', array('class' => 'r' . $parity));
         $o .= html_writer::tag('td', $question->format_text($question->stems[$stemid], $question->stemformat[$stemid], $qa, 'qtype_order', 'subquestion', $stemid), array('class' => 'text'));
         $classes = 'control';
         $feedback = $this->get_feedback_class_image($qa, $options, $key);
         if ($feedback->class) {
             $classes .= ' ' . $feedback->class;
         }
         $selected = $this->get_selected($question, $response, $key);
         $o .= html_writer::tag('td', html_writer::select($choices, $qa->get_qt_field_name($question->get_field_name($key)), $selected, array('0' => 'choose'), array('disabled' => $options->readonly)) . ' ' . $feedback->image, array('class' => $classes));
         $o .= html_writer::end_tag('tr');
         $parity = 1 - $parity;
     }
     $o .= html_writer::end_tag('tbody');
     $o .= html_writer::end_tag('table');
     return $o;
 }
开发者ID:jacac,项目名称:qtype_order,代码行数:26,代码来源:renderer.php

示例7: facetoface_send_admin_upgrade_msg

/**
 *
 * Sends message to administrator listing all updated
 * duplicate custom fields
 * @param array $data
 */
function facetoface_send_admin_upgrade_msg($data)
{
    global $SITE;
    // No data - no need to send email.
    if (empty($data)) {
        return;
    }
    $table = new html_table();
    $table->head = array('Custom field ID', 'Custom field original shortname', 'Custom field new shortname');
    $table->data = $data;
    $table->align = array('center', 'center', 'center');
    $title = "{$SITE->fullname}: Face to Face upgrade info";
    $note = 'During the last site upgrade the face-to-face module has been modified. It now
requires session custom fields to have unique shortnames. Since some of your
custom fields had duplicate shortnames, they have been renamed to remove
duplicates (see table below). This could impact on your email messages if you
reference those custom fields in the message templates.';
    $message = html_writer::start_tag('html');
    $message .= html_writer::start_tag('head') . html_writer::tag('title', $title) . html_writer::end_tag('head');
    $message .= html_writer::start_tag('body');
    $message .= html_writer::tag('p', $note) . html_writer::table($table, true);
    $message .= html_writer::end_tag('body');
    $message .= html_writer::end_tag('html');
    $admin = get_admin();
    email_to_user($admin, $admin, $title, '', $message);
}
开发者ID:CWRTP,项目名称:facetoface-2.0,代码行数:32,代码来源:upgrade.php

示例8: render_custom_menu_item

 /**
  * Renders a custom menu node as part of a submenu
  *
  * The custom menu this method override the render_custom_menu_item function
  * in outputrenderers.php
  *
  * @see render_custom_menu()
  *
  * @staticvar int $submenucount
  * @param custom_menu_item $menunode
  * @return string
  */
 protected function render_custom_menu_item(custom_menu_item $menunode)
 {
     // Required to ensure we get unique trackable id's
     static $submenucount = 0;
     $content = html_writer::start_tag('li');
     if ($menunode->has_children()) {
         // If the child has menus render it as a sub menu
         $submenucount++;
         if ($menunode->get_url() !== null) {
             $url = $menunode->get_url();
         } else {
             $url = '#cm_submenu_' . $submenucount;
         }
         $content .= html_writer::start_tag('span', array('class' => 'customitem'));
         $content .= html_writer::link($url, $menunode->get_text(), array('title' => $menunode->get_title()));
         $content .= html_writer::end_tag('span');
         $content .= html_writer::start_tag('ul');
         foreach ($menunode->get_children() as $menunode) {
             $content .= $this->render_custom_menu_item($menunode);
         }
         $content .= html_writer::end_tag('ul');
     } else {
         // The node doesn't have children so produce a final menuitem
         if ($menunode->get_url() !== null) {
             $url = $menunode->get_url();
         } else {
             $url = '#';
         }
         $content .= html_writer::link($url, $menunode->get_text(), array('title' => $menunode->get_title()));
     }
     $content .= html_writer::end_tag('li');
     // Return the sub menu
     return $content;
 }
开发者ID:nadavkav,项目名称:Moodle2-Hebrew-plugins,代码行数:46,代码来源:renderers.php

示例9: apply

 public function apply($discussion, $all, $selected, $formdata)
 {
     global $COURSE, $USER, $CFG, $PAGE;
     $d = $discussion->get_id();
     $forum = $discussion->get_forum();
     $PAGE->set_pagelayout('embedded');
     $out = mod_forumng_utils::get_renderer();
     print $out->header();
     $backlink = new moodle_url('/mod/forumng/discuss.php', $discussion->get_link_params_array());
     print html_writer::start_tag('div', array('class' => 'forumng-printable-header'));
     print html_writer::tag('div', link_arrow_left($discussion->get_subject(), $backlink), array('class' => 'forumng-printable-backlink'));
     print html_writer::tag('div', get_string('printedat', 'forumngfeature_print', userdate(time())), array('class' => 'forumng-printable-date'));
     print html_writer::tag('div', '', array('class' => 'clearer'));
     print "\n";
     print $out->box(get_string('back', 'forumngfeature_print', $backlink->out()), 'generalbox forumng-donotprint');
     print html_writer::start_tag('div', array('class' => 'forumng-showprintable'));
     if ($all) {
         print $out->render_discussion($discussion, array(mod_forumng_post::OPTION_NO_COMMANDS => true, mod_forumng_post::OPTION_CHILDREN_EXPANDED => true, mod_forumng_post::OPTION_PRINTABLE_VERSION => true));
     } else {
         $allhtml = '';
         $alltext = '';
         $discussion->build_selected_posts_email($selected, $alltext, $allhtml, array(mod_forumng_post::OPTION_PRINTABLE_VERSION));
         print $allhtml;
     }
     print html_writer::end_tag('div');
     $forum->print_js(0, false);
     print $out->footer();
 }
开发者ID:ULCC-QMUL,项目名称:moodle-mod_forumng,代码行数:28,代码来源:print.php

示例10: pmalphabox

/**
 * Prints the 'All A B C ...' alphabetical filter bar.
 *
 * @param object $moodle_url the moodle url object for the alpha/letter links
 * @param string $pname      the parameter name to be appended to the moodle_url
 *                           i.e. 'pname=alpha'
 * @param string $label      optional label - defaults to none
 */
function pmalphabox($moodle_url, $pname = 'alpha', $label = null)
{
    $alpha = optional_param($pname, null, PARAM_ALPHA);
    $alphabet = explode(',', get_string('alphabet', 'langconfig'));
    $strall = get_string('all');
    echo html_writer::start_tag('div', array('style' => 'text-align:center'));
    if (!empty($label)) {
        echo $label, ' ';
        // TBD: html_writer::???
    }
    if ($alpha) {
        $url = clone $moodle_url;
        // TBD
        $url->remove_params($pname);
        echo html_writer::link($url, $strall);
    } else {
        echo html_writer::tag('b', $strall);
    }
    foreach ($alphabet as $letter) {
        if ($letter == $alpha) {
            echo ' ', html_writer::tag('b', $letter);
        } else {
            $url = clone $moodle_url;
            // TBD
            // Set current page to 0
            $url->params(array($pname => $letter, 'page' => 0));
            echo ' ', html_writer::link($url, $letter);
        }
    }
    echo html_writer::end_tag('div');
}
开发者ID:jamesmcq,项目名称:elis,代码行数:39,代码来源:lib.php

示例11: block_campusclash_print_page

function block_campusclash_print_page($campusclash, $return = false)
{
    //Add Page Title
    global $OUTPUT, $COURSE;
    $display = $OUTPUT->heading($campusclash->pagetitle);
    //Open a box
    $display .= $OUTPUT->box_start();
    //Display the Date
    if ($campusclash->displaydate) {
        $display .= html_writer::start_tag('div', array('class' => 'displaydate'));
        $display .= userdate($campusclash->displaydate);
        $display .= html_writer::end_tag('div');
    }
    //Display Text
    $display .= clean_text($campusclash->displaytext);
    //close the box
    $display .= $OUTPUT->box_end();
    //Display the Picture
    if ($campusclash->displaypicture) {
        $display .= $OUTPUT->box_start();
        $images = block_campusclash_images();
        $display .= $images[$campusclash->picture];
        $display .= html_writer::start_tag('p');
        $display .= clean_text($campusclash->description);
        $display .= html_writer::end_tag('p');
        $display .= $OUTPUT->box_end();
    }
    //Check to ensure that it was set before trying to output it
    if ($return) {
        return $display;
    } else {
        echo $display;
    }
}
开发者ID:jpablonc94,项目名称:campusclashGithub,代码行数:34,代码来源:lib.php

示例12: user_report

 public function user_report($data)
 {
     $html = '';
     foreach ($data->info as $i) {
         $html .= html_writer::start_tag('strong');
         $html .= html_writer::tag('span', $i->title);
         $html .= html_writer::end_tag('strong');
         $html .= html_writer::empty_tag('br');
         $html .= $this->output->help_icon('weighting', 'engagementindicator_login');
         $html .= html_writer::tag('span', get_string('weighting', 'engagementindicator_login') . ': ' . $i->weighting);
         $html .= html_writer::empty_tag('br');
         $html .= $this->output->help_icon('localrisk', 'engagementindicator_login');
         $html .= html_writer::tag('span', get_string('localrisk', 'engagementindicator_login') . ': ' . $i->localrisk);
         $html .= html_writer::empty_tag('br');
         $html .= $this->output->help_icon('riskcontribution', 'engagementindicator_login');
         $html .= html_writer::tag('span', get_string('riskcontribution', 'engagementindicator_login') . ': ' . $i->riskcontribution);
         $html .= html_writer::empty_tag('br');
         $html .= $this->output->help_icon('logic', 'engagementindicator_assessment');
         $html .= html_writer::tag('span', get_string('logic', 'engagementindicator_login') . ': ' . $i->logic);
         $html .= html_writer::empty_tag('br');
         $html .= html_writer::empty_tag('br');
     }
     $value = sprintf("%.0f%%", 100 * $data->risk);
     $html .= html_writer::tag('span', get_string('riskscore', 'engagement') . ": {$value}");
     return $html;
 }
开发者ID:djplaner,项目名称:moodle-mod_engagement,代码行数:26,代码来源:renderer.php

示例13: question

 /**
  * Generate the display of a question in a particular state, and with certain
  * display options. Normally you do not call this method directly. Intsead
  * you call {@link question_usage_by_activity::render_question()} which will
  * call this method with appropriate arguments.
  *
  * @param question_attempt $qa the question attempt to display.
  * @param qbehaviour_renderer $behaviouroutput the renderer to output the behaviour
  *      specific parts.
  * @param qtype_renderer $qtoutput the renderer to output the question type
  *      specific parts.
  * @param question_display_options $options controls what should and should not be displayed.
  * @param string|null $number The question number to display. 'i' is a special
  *      value that gets displayed as Information. Null means no number is displayed.
  * @return string HTML representation of the question.
  */
 public function question(question_attempt $qa, qbehaviour_renderer $behaviouroutput, qtype_renderer $qtoutput, question_display_options $options, $number)
 {
     //start a new output buffer
     $output = '';
     //add the quesiton number (TODO: style?)
     //$output .= '<strong>' . $number .'.</strong>&nbsp; &nbsp;';
     $output .= html_writer::start_tag('table', array('style' => 'width: 100%; padding-bottom: 4px;'));
     $output .= html_writer::start_tag('tr', array());
     $output .= html_writer::tag('td', $number . '.', array('valign' => 'top', 'width' => '10%', 'style' => 'padding-right: 10px;'));
     $output .= html_writer::start_tag('td', array('width' => '90%'));
     //get the question from the attempt object
     $question = $qa->get_question();
     $pragmas = self::extract_pragmas($question->format_questiontext($qa));
     //add the question's formulation
     $output .= $this->formulation($qa, $behaviouroutput, $qtoutput, $options);
     //an indication of output, if appropriate
     $output .= $this->outcome($qa, $behaviouroutput, $qtoutput, $options);
     //any manual comments, if appropriate
     $output .= $this->manual_comment($qa, $behaviouroutput, $qtoutput, $options);
     //the user's response history, if appropriate
     $output .= $this->response_history($qa, $behaviouroutput, $qtoutput, $options);
     $output .= html_writer::end_tag('td');
     $output .= html_writer::end_tag('tr');
     $output .= html_writer::end_tag('table');
     //if a pragma exists specifying the space after a given quesiton, use it; otherwise, assume 5px
     //$space_after = array_key_exists('space_after', $pragmas) ? $pragmas['space_after'] : '5px';
     $space_after = array_key_exists('space_after', $pragmas) ? $pragmas['space_after'] : 0;
     //and add a spacer after the given question
     if ($space_after !== 0) {
         $output .= html_writer::tag('div', '&nbsp;', array('style' => 'height: ' . $space_after . ';'));
     }
     //return the contents of the output buffer
     return $output;
 }
开发者ID:advancingdesign,项目名称:moodle-theme_pdf,代码行数:50,代码来源:core_question_pdf_renderer.php

示例14: subscriber_selection_form

 /**
  * This method is used to generate HTML for a subscriber selection form that
  * uses two user_selector controls
  *
  * @param user_selector_base $existinguc
  * @param user_selector_base $potentialuc
  * @return string
  */
 public function subscriber_selection_form(user_selector_base $existinguc, user_selector_base $potentialuc)
 {
     $output = '';
     $formattributes = array();
     $formattributes['id'] = 'subscriberform';
     $formattributes['action'] = '';
     $formattributes['method'] = 'post';
     $output .= html_writer::start_tag('form', $formattributes);
     $output .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'sesskey', 'value' => sesskey()));
     $existingcell = new html_table_cell();
     $existingcell->text = $existinguc->display(true);
     $existingcell->attributes['class'] = 'existing';
     $actioncell = new html_table_cell();
     $actioncell->text = html_writer::start_tag('div', array());
     $actioncell->text .= html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'subscribe', 'value' => $this->page->theme->larrow . ' ' . get_string('add'), 'class' => 'actionbutton'));
     $actioncell->text .= html_writer::empty_tag('br', array());
     $actioncell->text .= html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'unsubscribe', 'value' => $this->page->theme->rarrow . ' ' . get_string('remove'), 'class' => 'actionbutton'));
     $actioncell->text .= html_writer::end_tag('div', array());
     $actioncell->attributes['class'] = 'actions';
     $potentialcell = new html_table_cell();
     $potentialcell->text = $potentialuc->display(true);
     $potentialcell->attributes['class'] = 'potential';
     $table = new html_table();
     $table->attributes['class'] = 'subscribertable boxaligncenter';
     $table->data = array(new html_table_row(array($existingcell, $actioncell, $potentialcell)));
     $output .= html_writer::table($table);
     $output .= html_writer::end_tag('form');
     return $output;
 }
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:37,代码来源:renderer.php

示例15: block_advance_print_page

function block_advance_print_page($advance, $return = false)
{
    //add page title
    global $OUTPUT, $COURSE;
    $display = $OUTPUT->heading($advance->pagetitle);
    $display .= $OUTPUT->box_start();
    //date display
    if ($advance->displaydate) {
        $display .= html_writer::start_tag('div', array('class' => 'advance displaydate'));
        $display .= userdate($advance->displaydate);
        $display .= html_writer::end_tag('div');
    }
    //display text
    $display .= clean_text($advance->displaytext);
    //close the box
    $display .= $OUTPUT->box_end();
    //display picture
    if ($advance->displaypicture) {
        $display .= $OUTPUT->box_start();
        $images = block_advance_images();
        $display .= $images[$advance->picture];
        $display .= html_writer::start_tag('p');
        $display .= clean_text($advance->description);
        $display .= html_writer::end_tag('p');
        $display .= $OUTPUT->box_end();
    }
    //display it
    if ($return) {
        return $display;
    } else {
        echo $display;
    }
}
开发者ID:samridhmathur,项目名称:moodle_block,代码行数:33,代码来源:lib.php


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