当前位置: 首页>>代码示例>>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;未经允许,请勿转载。