本文整理汇总了PHP中N2Html::clear方法的典型用法代码示例。如果您正苦于以下问题:PHP N2Html::clear方法的具体用法?PHP N2Html::clear怎么用?PHP N2Html::clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类N2Html
的用法示例。
在下文中一共展示了N2Html::clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderType
protected function renderType()
{
$params = $this->slider->params;
N2JS::addFiles(N2Filesystem::translate(dirname(__FILE__) . "/gsap"), array("MainAnimationSimple.js", "TypeSimple.js", "ResponsiveSimple.js"), "smartslider-simple-type-frontend");
N2JS::addFiles(N2Filesystem::translate(dirname(__FILE__) . "/gsap"), array("BackgroundAnimation.js"), "smartslider-simple-type-frontend");
N2JS::addFiles(NEXTEND_SMARTSLIDER_ASSETS . "/js/animation", array("BackgroundAnimationAbstract.js", 'Flux.js'), "smartslider-simple-type-frontend");
$background = $params->get('background');
$css = $params->get('slider-css');
$slidecss = $params->get('slide-css');
if (!empty($background)) {
$css = 'background-image: url(' . N2ImageHelper::fixed($background) . ');';
}
$this->initBackgroundAnimation();
echo $this->openSliderElement();
?>
<div class="n2-ss-slider-1" style="<?php
echo $css;
?>
">
<?php
echo $this->getBackgroundVideo($params);
?>
<div class="n2-ss-slider-2">
<?php
if ($this->backgroundAnimation) {
?>
<div class="n2-ss-background-animation"></div>
<?php
}
?>
<div class="n2-ss-slider-3" style="<?php
echo $slidecss;
?>
">
<?php
echo $this->slider->staticHtml;
foreach ($this->slider->slides as $i => $slide) {
echo N2Html::tag('div', $slide->attributes + array('class' => 'n2-ss-slide n2-ss-canvas ' . $slide->classes, 'style' => $slide->style), $slide->background . $slide->getHTML());
}
?>
</div>
</div>
</div>
<?php
$this->widgets->echoRemainder();
echo N2Html::closeTag('div');
$this->javaScriptProperties['mainanimation'] = array('type' => $params->get('animation'), 'duration' => intval($params->get('animation-duration')), 'delay' => intval($params->get('animation-delay')), 'ease' => $params->get('animation-easing'), 'parallax' => floatval($params->get('animation-parallax')), 'shiftedBackgroundAnimation' => $params->get('animation-shifted-background-animation'));
$this->javaScriptProperties['mainanimation']['shiftedBackgroundAnimation'] = 0;
$this->javaScriptProperties['carousel'] = intval($params->get('carousel'));
$this->javaScriptProperties['dynamicHeight'] = intval($params->get('dynamic-height', '0'));
$this->javaScriptProperties['dynamicHeight'] = 0;
N2Plugin::callPlugin('nextendslider', 'onNextendSliderProperties', array(&$this->javaScriptProperties));
N2JS::addFirstCode("new NextendSmartSliderSimple('#{$this->slider->elementId}', " . json_encode($this->javaScriptProperties) . ");");
echo N2Html::clear();
}