當前位置: 首頁>>代碼示例>>PHP>>正文


PHP toolbox::render_slide方法代碼示例

本文整理匯總了PHP中theme_essential\toolbox::render_slide方法的典型用法代碼示例。如果您正苦於以下問題:PHP toolbox::render_slide方法的具體用法?PHP toolbox::render_slide怎麽用?PHP toolbox::render_slide使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在theme_essential\toolbox的用法示例。


在下文中一共展示了toolbox::render_slide方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: test_render_slide

 public function test_render_slide()
 {
     $theslide = \theme_essential\toolbox::render_slide(1, 0);
     $thecontent = '<a href="https://about.me/gjbarnard" target="_blank" class="item side-caption active">';
     $thecontent .= '<div class="container-fluid"><div class="row-fluid"><div class="span5 the-side-caption">';
     $thecontent .= '<div class="the-side-caption-content"><h4>Test slide one</h4><div><p>Test of link in caption: me.</p>';
     $thecontent .= '</div></div></div><div class="span7"><div class="carousel-image-container">';
     $thecontent .= '<img src="http://www.example.com/moodle/theme/image.php/_s/essential/theme/1/default_slide" ';
     $thecontent .= 'alt="Test slide one" class="carousel-image"></div></div></div></div></a>';
     $this->assertEquals($thecontent, $theslide);
     $theslide = \theme_essential\toolbox::render_slide(2, 0);
     $thecontent = '<div class="item side-caption">';
     $thecontent .= '<div class="container-fluid"><div class="row-fluid"><div class="span5 the-side-caption">';
     $thecontent .= '<div class="the-side-caption-content"><h4>Test slide two</h4><div>';
     $thecontent .= '<p>Test of link in caption: <a href="https://about.me/gjbarnard" target="_blank">me.</a></p>';
     $thecontent .= '</div></div></div><div class="span7"><div class="carousel-image-container">';
     $thecontent .= '<img src="http://www.example.com/moodle/theme/image.php/_s/essential/theme/1/default_slide" ';
     $thecontent .= 'alt="Test slide two" class="carousel-image"></div></div></div></div></div>';
     $this->assertEquals($thecontent, $theslide);
 }
開發者ID:igormateus,項目名稱:moodle-theme_essential,代碼行數:20,代碼來源:toolbox_test.php

示例2:

    echo $OUTPUT->essential_edit_button('theme_essential_slideshow');
    ?>
                <ol class="carousel-indicators">
                    <?php 
    for ($indicatorslideindex = 0; $indicatorslideindex < $numberofslides; $indicatorslideindex++) {
        echo '<li data-target="#essentialCarousel" data-slide-to="' . $indicatorslideindex . '"';
        if ($indicatorslideindex == 0) {
            echo 'class="active"';
        }
        echo '></li>';
    }
    ?>
                </ol>
                <div class="carousel-inner<?php 
    echo $captionscenter . $captionsbelowclass;
    ?>
">
                    <?php 
    for ($slideindex = 1; $slideindex <= $numberofslides; $slideindex++) {
        echo \theme_essential\toolbox::render_slide($slideindex, $captionoptions);
    }
    ?>
                </div>
                <?php 
    echo \theme_essential\toolbox::render_slide_controls($left);
    ?>
            </div>
        </div>
    </div>
<?php 
}
開發者ID:RobsonTK,項目名稱:Moodle,代碼行數:31,代碼來源:slideshow.php

示例3: test_render_slide

 public function test_render_slide()
 {
     set_config('slide1url', 'https://about.me/gjbarnard', 'theme_essential');
     set_config('slide1target', '_blank', 'theme_essential');
     set_config('slide1', 'Test slide one', 'theme_essential');
     set_config('slide1caption', '<p>Test of link in caption: <a href="https://about.me/gjbarnard" target="_blank">me.</a></p>', 'theme_essential');
     set_config('slide2target', '_blank', 'theme_essential');
     set_config('slide2', 'Test slide two', 'theme_essential');
     set_config('slide2caption', '<p>Test of link in caption: <a href="https://about.me/gjbarnard" target="_blank">me.</a></p>', 'theme_essential');
     $this->resetAfterTest(true);
     $this->setup_renderer();
     $theslide1 = \theme_essential\toolbox::render_slide(1, 0);
     $thecontent1 = '<a href="https://about.me/gjbarnard" target="_blank" class="item side-caption active">';
     $thecontent1 .= '<div class="container-fluid"><div class="row-fluid"><div class="span5 the-side-caption">';
     $thecontent1 .= '<div class="the-side-caption-content"><h4>Test slide one</h4><div><p>Test of link in caption: me.</p>';
     $thecontent1 .= '</div></div></div><div class="span7"><div class="carousel-image-container">';
     $thecontent1 .= '<img src="http://www.example.com/moodle/theme/image.php/_s/essential/theme/1/default_slide" ';
     $thecontent1 .= 'alt="Test slide one" class="carousel-image"></div></div></div></div></a>';
     $this->assertEquals($thecontent1, $theslide1);
     $theslide2 = \theme_essential\toolbox::render_slide(2, 0);
     $thecontent2 = '<div class="item side-caption">';
     $thecontent2 .= '<div class="container-fluid"><div class="row-fluid"><div class="span5 the-side-caption">';
     $thecontent2 .= '<div class="the-side-caption-content"><h4>Test slide two</h4><div>';
     $thecontent2 .= '<p>Test of link in caption: <a href="https://about.me/gjbarnard" target="_blank">me.</a></p>';
     $thecontent2 .= '</div></div></div><div class="span7"><div class="carousel-image-container">';
     $thecontent2 .= '<img src="http://www.example.com/moodle/theme/image.php/_s/essential/theme/1/default_slide" ';
     $thecontent2 .= 'alt="Test slide two" class="carousel-image"></div></div></div></div></div>';
     $this->assertEquals($thecontent2, $theslide2);
 }
開發者ID:lucisgit,項目名稱:moodle-theme_essential,代碼行數:29,代碼來源:toolbox_test.php


注:本文中的theme_essential\toolbox::render_slide方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。