本文整理汇总了PHP中RevOperations::getCustomAnimationByHandle方法的典型用法代码示例。如果您正苦于以下问题:PHP RevOperations::getCustomAnimationByHandle方法的具体用法?PHP RevOperations::getCustomAnimationByHandle怎么用?PHP RevOperations::getCustomAnimationByHandle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevOperations
的用法示例。
在下文中一共展示了RevOperations::getCustomAnimationByHandle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: putCreativeLayer
/**
*
* put creative layer
*/
private function putCreativeLayer(RevSlide $slide, $static_slide = false)
{
$layers = $slide->getLayers();
$customAnimations = RevOperations::getCustomAnimations('customin');
//get all custom animations
$customEndAnimations = RevOperations::getCustomAnimations('customout');
//get all custom animations
$startAnimations = RevOperations::getArrAnimations(false);
//only get the standard animations
$endAnimations = RevOperations::getArrEndAnimations(false);
//only get the standard animations
$lazyLoad = $this->slider->getParam("lazy_load", "off");
$isTemplate = $this->slider->getParam("template", "false");
if (empty($layers)) {
return false;
}
$zIndex = 5;
foreach ($layers as $layer) {
$type = UniteFunctionsRev::getVal($layer, "type", "text");
//set if video full screen
$videoclass = '';
$isFullWidthVideo = false;
if ($type == "video") {
$videoclass = ' tp-videolayer';
$videoData = UniteFunctionsRev::getVal($layer, "video_data");
if (!empty($videoData)) {
$videoData = (array) $videoData;
$isFullWidthVideo = UniteFunctionsRev::getVal($videoData, "fullwidth");
$isFullWidthVideo = UniteFunctionsRev::strToBool($isFullWidthVideo);
} else {
$videoData = array();
}
}
$class = UniteFunctionsRev::getVal($layer, "style");
if (trim($class) !== '') {
$this->class_include['.' . trim($class)] = true;
}
//add classname for style inclusion
$animation = UniteFunctionsRev::getVal($layer, "animation", "tp-fade");
if ($animation == "fade") {
$animation = "tp-fade";
}
$customin = '';
if (!array_key_exists($animation, $startAnimations) && array_key_exists($animation, $customAnimations)) {
//if true, add custom animation
$customin .= 'data-customin="';
$animArr = RevOperations::getCustomAnimationByHandle($customAnimations[$animation]);
if ($animArr !== false) {
$customin .= RevOperations::parseCustomAnimationByArray($animArr);
}
$customin .= '"';
$animation = 'customin';
}
if (strpos($animation, 'customin-') !== false || strpos($animation, 'customout-') !== false) {
$animation = "tp-fade";
}
//set output class:
$layer_2d_rotation = intval(UniteFunctionsRev::getVal($layer, "2d_rotation", '0'));
$layer_2d_origin_x = intval(UniteFunctionsRev::getVal($layer, "2d_origin_x", '50'));
$layer_2d_origin_y = intval(UniteFunctionsRev::getVal($layer, "2d_origin_y", '50'));
if ($layer_2d_rotation == 0) {
$outputClass = "tp-caption " . trim($class);
} else {
$outputClass = "tp-caption ";
}
$outputClass = trim($outputClass) . " ";
$outputClass .= trim($animation);
$left = UniteFunctionsRev::getVal($layer, "left", 0);
$top = UniteFunctionsRev::getVal($layer, "top", 0);
$speed = UniteFunctionsRev::getVal($layer, "speed", 300);
$time = UniteFunctionsRev::getVal($layer, "time", 0);
$easing = UniteFunctionsRev::getVal($layer, "easing", "easeOutExpo");
$randomRotate = UniteFunctionsRev::getVal($layer, "random_rotation", "false");
$randomRotate = UniteFunctionsRev::boolToStr($randomRotate);
$splitin = UniteFunctionsRev::getVal($layer, "split", "none");
$splitout = UniteFunctionsRev::getVal($layer, "endsplit", "none");
$elementdelay = intval(UniteFunctionsRev::getVal($layer, "splitdelay", 0));
$endelementdelay = intval(UniteFunctionsRev::getVal($layer, "endsplitdelay", 0));
if ($elementdelay > 0) {
$elementdelay /= 100;
}
if ($endelementdelay > 0) {
$endelementdelay /= 100;
}
$text = UniteFunctionsRev::getVal($layer, "text");
if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
//use qTranslate
$text = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
}
$htmlVideoAutoplay = "";
$htmlVideoAutoplayOnlyFirstTime = "";
$htmlVideoNextSlide = "";
$htmlVideoThumbnail = "";
$htmlMute = '';
$htmlCover = '';
$htmlDotted = '';
//.........这里部分代码省略.........
示例2: putCreativeLayer
/**
*
* put creative layer
*/
private function putCreativeLayer(RevSlide $slide)
{
$layers = $slide->getLayers();
$customAnimations = RevOperations::getCustomAnimations('customin');
//get all custom animations
$customEndAnimations = RevOperations::getCustomAnimations('customout');
//get all custom animations
$startAnimations = RevOperations::getArrAnimations(false);
//only get the standard animations
$endAnimations = RevOperations::getArrEndAnimations(false);
//only get the standard animations
$lazyLoad = $this->slider->getParam("lazy_load", "off");
if (empty($layers)) {
return false;
}
$zIndex = 2;
foreach ($layers as $layer) {
$type = UniteFunctionsRev::getVal($layer, "type", "text");
//set if video full screen
$isFullWidthVideo = false;
if ($type == "video") {
$videoData = UniteFunctionsRev::getVal($layer, "video_data");
if (!empty($videoData)) {
$videoData = (array) $videoData;
$isFullWidthVideo = UniteFunctionsRev::getVal($videoData, "fullwidth");
$isFullWidthVideo = UniteFunctionsRev::strToBool($isFullWidthVideo);
} else {
$videoData = array();
}
}
$class = UniteFunctionsRev::getVal($layer, "style");
$animation = UniteFunctionsRev::getVal($layer, "animation", "tp-fade");
if ($animation == "fade") {
$animation = "tp-fade";
}
$customin = '';
if (!array_key_exists($animation, $startAnimations) && array_key_exists($animation, $customAnimations)) {
//if true, add custom animation
$customin .= 'data-customin="';
$animArr = RevOperations::getCustomAnimationByHandle($customAnimations[$animation]);
if ($animArr !== false) {
$customin .= RevOperations::parseCustomAnimationByArray($animArr);
}
$customin .= '"';
$animation = 'customin';
}
if (strpos($animation, 'customin-') !== false || strpos($animation, 'customout-') !== false) {
$animation = "tp-fade";
}
//set output class:
$outputClass = "tp-caption " . trim($class);
$outputClass = trim($outputClass) . " ";
$outputClass .= trim($animation);
$left = UniteFunctionsRev::getVal($layer, "left", 0);
$top = UniteFunctionsRev::getVal($layer, "top", 0);
$speed = UniteFunctionsRev::getVal($layer, "speed", 300);
$time = UniteFunctionsRev::getVal($layer, "time", 0);
$easing = UniteFunctionsRev::getVal($layer, "easing", "easeOutExpo");
$randomRotate = UniteFunctionsRev::getVal($layer, "random_rotation", "false");
$randomRotate = UniteFunctionsRev::boolToStr($randomRotate);
$splitin = UniteFunctionsRev::getVal($layer, "split", "none");
$splitout = UniteFunctionsRev::getVal($layer, "endsplit", "none");
$elementdelay = intval(UniteFunctionsRev::getVal($layer, "splitdelay", 0));
$endelementdelay = intval(UniteFunctionsRev::getVal($layer, "endsplitdelay", 0));
if ($elementdelay > 0) {
$elementdelay /= 100;
}
if ($endelementdelay > 0) {
$endelementdelay /= 100;
}
$text = UniteFunctionsRev::getVal($layer, "text");
$htmlVideoAutoplay = "";
$htmlVideoAutoplayOnlyFirstTime = "";
$htmlVideoNextSlide = "";
$htmlVideoThumbnail = "";
$htmlMute = '';
$htmlCover = '';
$htmlDotted = '';
$htmlRatio = '';
$htmlRewind = '';
$ids = UniteFunctionsRev::getVal($layer, "attrID");
$classes = UniteFunctionsRev::getVal($layer, "attrClasses");
$title = UniteFunctionsRev::getVal($layer, "attrTitle");
$rel = UniteFunctionsRev::getVal($layer, "attrRel");
$ids = $ids != '' ? ' id="' . $ids . '"' : '';
$classes = $classes != '' ? ' ' . $classes : '';
$title = $title != '' ? ' title="' . $title . '"' : '';
$rel = $rel != '' ? ' rel="' . $rel . '"' : '';
$max_width = UniteFunctionsRev::getVal($layer, "max_width", 'auto');
$max_height = UniteFunctionsRev::getVal($layer, "max_height", 'auto');
$white_space = UniteFunctionsRev::getVal($layer, "whitespace", 'nowrap');
$inline_styles = '';
//set html:
$html = "";
switch ($type) {
default:
//.........这里部分代码省略.........