当前位置: 首页>>代码示例>>PHP>>正文


PHP N2Plugin::callPlugin方法代码示例

本文整理汇总了PHP中N2Plugin::callPlugin方法的典型用法代码示例。如果您正苦于以下问题:PHP N2Plugin::callPlugin方法的具体用法?PHP N2Plugin::callPlugin怎么用?PHP N2Plugin::callPlugin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在N2Plugin的用法示例。


在下文中一共展示了N2Plugin::callPlugin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loadList

 function loadList()
 {
     $_list = array();
     N2Plugin::callPlugin('sstype', 'onTypeList', array(&$_list, &$this->labels));
     $this->_list = array();
     /**
      * We have to force the proper order in the slider types
      */
     if (isset($_list['simple'])) {
         $this->_list['simple'] = $_list['simple'];
         unset($_list['simple']);
     }
     if (isset($_list['carousel'])) {
         $this->_list['carousel'] = $_list['carousel'];
         unset($_list['carousel']);
     }
     if (isset($_list['showcase'])) {
         $this->_list['showcase'] = $_list['showcase'];
         unset($_list['showcase']);
     }
     if (isset($_list['horizontalaccordion'])) {
         $this->_list['horizontalaccordion'] = $_list['horizontalaccordion'];
         unset($_list['horizontalaccordion']);
     }
     if (isset($_list['verticalaccordion'])) {
         $this->_list['verticalaccordion'] = $_list['verticalaccordion'];
         unset($_list['verticalaccordion']);
     }
     $this->_list += $_list;
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:30,代码来源:slidertype.php

示例2: loadList

 function loadList()
 {
     $_list = array();
     N2Plugin::callPlugin('ssresponsive', 'onResponsiveList', array(&$_list, &$this->labels));
     $this->_list = array();
     $this->_list += $_list;
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:7,代码来源:sliderresponsive.php

示例3: __construct

 /**
  * @param $slider N2SmartSlider
  */
 public function __construct($slider)
 {
     if (!$slider->isAdmin) {
         $params = $slider->params;
         $plugins = array();
         N2Plugin::callPlugin('sswidget', 'onWidgetList', array(&$plugins));
         foreach ($plugins as $k => $v) {
             $widget = $params->get('widget' . $k);
             if ($widget && $widget != 'disabled') {
                 $this->enabledWidgets[$k] = $widget;
             }
         }
         $positions = array();
         foreach ($this->enabledWidgets as $k => $v) {
             $class = 'N2SSPluginWidget' . $k . $v;
             if (class_exists($class, false)) {
                 $params->fillDefault(call_user_func(array($class, 'getDefaults')));
                 $positions += call_user_func_array(array($class, 'getPositions'), array(&$params));
             } else {
                 unset($this->enabledWidgets[$k]);
             }
         }
         $this->makePositions($positions, $params);
         foreach ($this->enabledWidgets as $k => $v) {
             $class = 'N2SSPluginWidget' . $k . $v;
             $this->widgets[$k] = call_user_func(array($class, 'render'), $slider, $slider->elementId, $params);
         }
     }
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:32,代码来源:widgets.php

示例4: _load

 private static function _load()
 {
     static $loaded;
     if (!$loaded) {
         N2Plugin::callPlugin('ssitem', 'onNextendSliderItemShortcode', array(&self::$items));
         $loaded = true;
     }
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:8,代码来源:item.php

示例5: getApplication

 /**
  * @param $name
  *
  * @return N2Application
  */
 public static function getApplication($name)
 {
     if (!isset(self::$applications[$name])) {
         self::_createApplication($name);
         N2Plugin::callPlugin('application', 'applicationLoaded', array($name));
     }
     return self::$applications[$name];
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:13,代码来源:base.php

示例6: getOptions

 function getOptions()
 {
     if ($this->_list == null) {
         $this->_list = array();
         N2Plugin::callPlugin(N2XmlHelper::getAttribute($this->_xml, 'group'), N2XmlHelper::getAttribute($this->_xml, 'method'), array(&$this->_list));
     }
     uasort($this->_list, array($this, 'sort'));
     return $this->_list;
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:9,代码来源:pluginmatrix.php

示例7: getWidgetPath

 private function getWidgetPath($name)
 {
     $list = array();
     N2Plugin::callPlugin('sswidget', 'onWidgetList', array(&$list));
     if (isset($list[$name])) {
         return $list[$name][1];
     }
     return false;
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:9,代码来源:Ajax.php

示例8: 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();
    }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:57,代码来源:type.php

示例9: loadList

 function loadList()
 {
     if ($this->_list == null) {
         $this->_group = array();
         $this->_list = array();
         N2Plugin::callPlugin(N2XmlHelper::getAttribute($this->_xml, 'plugingroup'), N2XmlHelper::getAttribute($this->_xml, 'method'), array(&$this->_group, &$this->_list));
         $v = explode('_', $this->getValue());
         if (!isset($this->_list[$v[0]][$this->getValue()])) {
             $keys = array_keys($this->_list);
             $ks = array_keys($this->_list[$keys[0]]);
             $this->setValue($this->_list[$keys[0]][$ks[0]]);
         }
     }
 }
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:14,代码来源:plugingroup.php

示例10: fetchElement

 function fetchElement()
 {
     $items = array();
     N2Plugin::callPlugin('ssitem', 'onNextendSliderItemList', array(&$items));
     ob_start();
     ?>
     <div id="smartslider-slide-toolbox-item" class="nextend-clearfix smartslider-slide-toolbox-view">
         <?php 
     $itemModel = new N2SmartsliderItemModel();
     foreach ($items as $type => $item) {
         echo N2Html::openTag("div", array("id" => "smartslider-slide-toolbox-item-type-{$type}", "style" => "display:none", "data-itemtemplate" => $item[1], "data-itemvalues" => $item[3]));
         $itemModel->renderForm($type, $item);
         echo N2Html::closeTag("div");
     }
     ?>
     </div>
     <?php 
     return ob_get_clean();
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:19,代码来源:items.php

示例11: frontend

 public static function frontend($force = false)
 {
     static $once;
     if ($once != null && !$force) {
         return;
     }
     $once = true;
     N2AssetsManager::getInstance();
     N2JS::addInline('window.N2PRO=' . N2PRO . ';', true);
     N2JS::addInline('window.N2GSAP=' . N2GSAP . ';', true);
     N2JS::addInline('window.N2PLATFORM="' . N2Platform::getPlatform() . '";', true);
     N2JS::addInline('window.nextend={localization: {}, deferreds:[], loadScript: function(url){n2jQuery.ready(function () {nextend.deferreds.push(n2.ajax({url:url,dataType:"script",cache:true,error:function(){console.log(arguments)}}))})}, ready: function(cb){n2.when.apply(n2, nextend.deferreds).done(function(){cb.call(window,n2)})}};', true);
     N2JS::jQuery($force);
     N2JS::addFiles(N2LIBRARYASSETS . "/js", array('consts.js', 'class.js', 'base64.js', 'mobile-detect.js'), 'nextend-frontend');
     N2JS::addFiles(N2LIBRARYASSETS . "/js/core/jquery", array("jquery.imagesloaded.js", "litebox.js", "jquery.universalpointer.js", "jquery.mousewheel.js", "EventBurrito.js"), "nextend-frontend");
     N2JS::modernizr();
     N2CSS::addFiles(N2LIBRARYASSETS . "/css", array('litebox.css'), 'nextend-frontend');
     self::animation($force);
     N2Loader::import('libraries.fonts.fonts');
     N2Plugin::callPlugin('fontservices', 'onFontManagerLoad', array($force));
 }
开发者ID:MBerguer,项目名称:wp-demo,代码行数:21,代码来源:predefined.php

示例12: render

 public function render()
 {
     if (!$this->loadSlider()) {
         return false;
     }
     if (count($this->slides) == 0) {
         return false;
     }
     $this->assets = $this->getSliderTypeResource('css');
     $this->assets->render();
     $this->slides[$this->_activeSlide]->setActive();
     for ($i = 0; $i < count($this->slides); $i++) {
         $this->slides[$i]->prepare();
         $this->slides[$i]->setSlidesParams();
     }
     $this->renderStaticSlide();
     $slider = $this->sliderType->render();
     if (!$this->isAdmin) {
         N2Plugin::callPlugin('ssitem', 'onNextendSliderRender', array(&$slider, $this->elementId));
     }
     $slider = str_replace('n2-ss-0', $this->elementId, $slider);
     $dependency = intval($this->params->get('dependency'));
     if (!N2Platform::$isAdmin && $dependency > 0) {
         $slider = '<script id="' . $this->elementId . '" data-dependency="' . $dependency . '" type="rocket/slider">' . str_replace(array('<script', '</script'), array('<_s_c_r_i_p_t', '<_/_s_c_r_i_p_t'), $slider) . '</script>';
     }
     $slider = $this->features->translateUrl->renderSlider($slider);
     $slider = $this->features->align->renderSlider($slider, $this->assets->sizes['width']);
     $slider = $this->features->margin->renderSlider($slider);
     $slider .= $this->features->fadeOnLoad->renderPlaceholder($this->assets->sizes);
     return "\n<!-- Nextend Smart Slider 3 #" . $this->sliderId . " - BEGIN -->\n" . $slider . "\n<!-- Nextend Smart Slider 3 #" . $this->sliderId . " - END -->\n";
 }
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:31,代码来源:abstract.php

示例13: call_user_func

    <div class="n2-layers-tab" style="display:block;">

        <div id="smartslider-slide-toolbox-layer">
            <?php 
$class = 'N2SSPluginType' . $slider['type'];
N2Loader::importPath(call_user_func(array($class, "getPath")) . NDS . 'type');
$itemDefaults = call_user_func(array('N2SmartSliderType' . $slider['type'], 'getItemDefaults'));
?>
            <script type="text/javascript">
                window.ssitemmarker = true;
            </script>
            <div id="n2-ss-item-container" class="n2-sidebar-list-bg">
                <?php 
$items = array();
N2Plugin::callPlugin('ssitem', 'onNextendSliderItemList', array(&$items));
N2SSPluginItemAbstract::sortItems($items);
foreach ($items as $type => $item) {
    echo N2Html::tag('div', array('class' => 'n2-h5 n2-ss-core-item n2-ss-core-item-' . $type, 'data-layerproperties' => json_encode((object) array_merge($item[5], $itemDefaults)), 'data-item' => $type), N2Html::tag('div', array(), $item[0]));
}
?>
            </div>
            <script type="text/javascript">
                delete window.ssitemmarker;
            </script>

            <div id="n2-ss-layers-items-list">
                <ul class="n2-list n2-h4 n2-list-orderable">

                </ul>
            </div>
开发者ID:RenatoToasa,项目名称:Pagina-Web,代码行数:30,代码来源:_sidebar_slide.php

示例14: getGenerators

 public static function getGenerators()
 {
     static $groups;
     static $list;
     if (!$list) {
         $groups = array();
         $list = array();
         N2Plugin::callPlugin('ssgenerator', 'onGeneratorList', array(&$groups, &$list));
     }
     return array(&$groups, &$list);
 }
开发者ID:rfulwell,项目名称:transitionalresources.org,代码行数:11,代码来源:generator.php

示例15: import

 public function import($filePathOrData, $imageImportMode = 'clone', $linkedVisuals = 1, $isFilePath = true)
 {
     $zip = new N2ZipRead();
     $importData = $zip->read_zip($filePathOrData, $isFilePath);
     if (!isset($importData['data'])) {
         if (array_key_exists("slider.ss2", $importData)) {
             N2Message::error(n2_('You can\'t import sliders from Smart Slider 2.'));
         }
         return false;
     }
     $this->backup = unserialize($importData['data']);
     $this->sectionTranslation = array();
     $this->importVisuals($this->backup->visuals, $linkedVisuals);
     $sliderModel = new N2SmartsliderSlidersModel();
     if ($this->restore) {
         $this->sliderId = $sliderModel->restore($this->backup->slider);
     } else {
         $this->sliderId = $sliderModel->import($this->backup->slider);
     }
     if (!$this->sliderId) {
         return false;
     }
     switch ($imageImportMode) {
         case 'clone':
             $images = $importData['images'];
             $imageStore = new N2StoreImage('slider' . $this->sliderId, true);
             foreach ($images as $file => $content) {
                 $localImage = $imageStore->makeCache($file, $content);
                 if ($localImage) {
                     $this->imageTranslation[$file] = N2ImageHelper::dynamic(N2Uri::pathToUri($localImage));
                 } else {
                     $this->imageTranslation[$file] = $file;
                 }
                 if (!$this->imageTranslation[$file]) {
                     $this->imageTranslation[$file] = array_search($file, $this->backup->imageTranslation);
                 }
             }
             break;
         case 'update':
             $keys = array_keys($this->backup->NextendImageHelper_Export);
             $values = array_values($this->backup->NextendImageHelper_Export);
             foreach ($this->backup->imageTranslation as $image => $value) {
                 $this->imageTranslation[$value] = str_replace($keys, $values, $image);
             }
             break;
         default:
             break;
     }
     foreach ($this->backup->NextendImageManager_ImageData as $image => $data) {
         $data['tablet']['image'] = $this->fixImage($data['tablet']['image']);
         $data['mobile']['image'] = $this->fixImage($data['mobile']['image']);
         N2ImageManager::addImageData($this->fixImage($image), $data);
     }
     unset($importData);
     if (empty($this->backup->slider['type'])) {
         $this->backup->slider['type'] = 'simple';
     }
     $class = 'N2SSPluginType' . $this->backup->slider['type'];
     N2Loader::importPath(call_user_func(array($class, "getPath")) . NDS . 'backup');
     $class = 'N2SmartSliderBackup' . $this->backup->slider['type'];
     call_user_func_array(array($class, 'import'), array($this, &$this->backup->slider));
     $enabledWidgets = array();
     $plugins = array();
     N2Plugin::callPlugin('sswidget', 'onWidgetList', array(&$plugins));
     $params = $this->backup->slider['params'];
     foreach ($plugins as $k => $v) {
         $widget = $params->get('widget' . $k);
         if ($widget && $widget != 'disabled') {
             $enabledWidgets[$k] = $widget;
         }
     }
     foreach ($enabledWidgets as $k => $v) {
         $class = 'N2SSPluginWidget' . $k . $v;
         if (class_exists($class, false)) {
             $params->fillDefault(call_user_func(array($class, 'getDefaults')));
             call_user_func_array(array($class, 'prepareImport'), array($this, $params));
         } else {
             unset($enabledWidgets);
         }
     }
     $sliderModel->importUpdate($this->sliderId, $params);
     $generatorTranslation = array();
     N2Loader::import("models.generator", "smartslider");
     $generatorModel = new N2SmartsliderGeneratorModel();
     foreach ($this->backup->generators as $generator) {
         $generatorTranslation[$generator['id']] = $generatorModel->import($generator);
     }
     $slidesModel = new N2SmartsliderSlidesModel();
     for ($i = 0; $i < count($this->backup->slides); $i++) {
         $slide = $this->backup->slides[$i];
         $slide['params'] = new N2Data($slide['params'], true);
         $slide['thumbnail'] = $this->fixImage($slide['thumbnail']);
         $slide['params']->set('backgroundImage', $this->fixImage($slide['params']->get('backgroundImage')));
         $slide['params']->set('link', $this->fixLightbox($slide['params']->get('link')));
         $slide['slide'] = N2SmartSliderLayer::prepareImport($this, $slide['slide']);
         if (isset($generatorTranslation[$slide['generator_id']])) {
             $slide['generator_id'] = $generatorTranslation[$slide['generator_id']];
         }
         $slidesModel->import($slide, $this->sliderId);
     }
//.........这里部分代码省略.........
开发者ID:vicpril,项目名称:rep_bidqa,代码行数:101,代码来源:import.php


注:本文中的N2Plugin::callPlugin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。