本文整理汇总了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);
}
示例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
}
示例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);
}