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


PHP OW::getThemeManager方法代码示例

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


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

示例1: chooseTheme

 public function chooseTheme()
 {
     $this->themeService->updateThemeList();
     $this->themeService->updateThemesInfo();
     $themes = $this->themeService->findAllThemes();
     $themesInfo = array();
     $activeTheme = OW::getThemeManager()->getSelectedTheme()->getDto()->getName();
     /* @var $theme BOL_Theme */
     foreach ($themes as $theme) {
         $themesInfo[$theme->getName()] = (array) json_decode($theme->getDescription());
         $themesInfo[$theme->getName()]['key'] = $theme->getName();
         $themesInfo[$theme->getName()]['title'] = $theme->getTitle();
         $themesInfo[$theme->getName()]['iconUrl'] = $this->themeService->getStaticUrl($theme->getName()) . BOL_ThemeService::ICON_FILE;
         $themesInfo[$theme->getName()]['previewUrl'] = $this->themeService->getStaticUrl($theme->getName()) . BOL_ThemeService::PREVIEW_FILE;
         $themesInfo[$theme->getName()]['active'] = $theme->getName() === $activeTheme;
         $themesInfo[$theme->getName()]['changeUrl'] = OW::getRouter()->urlFor(__CLASS__, 'changeTheme', array('theme' => $theme->getName()));
         $themesInfo[$theme->getName()]['update_url'] = (int) $theme->getUpdate() === 1 && !defined('OW_PLUGIN_XP') ? OW::getRouter()->urlFor('ADMIN_CTRL_Themes', 'updateRequest', array('name' => $theme->getName())) : false;
     }
     OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('admin')->getStaticJsUrl() . 'theme_select.js');
     OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('base')->getStaticJsUrl() . 'jquery.sticky.js');
     OW::getDocument()->addOnloadScript("window.owThemes = new ThemesSelect(" . json_encode($themesInfo) . ");\n        \t\$('.selected_theme_info input.theme_select_submit').click(function(){\n    \t\t\twindow.location.href = '" . $themesInfo[$activeTheme]['changeUrl'] . "';\n    \t\t});\n            \$('.selected_theme_info_stick').sticky({topSpacing:60});\n            ");
     $adminTheme = OW::getThemeManager()->getThemeService()->getThemeObjectByName('origin');
     $defaultThemeImgUrl = $adminTheme === null ? '' : $adminTheme->getStaticImagesUrl();
     $this->assign('themeInfo', $themesInfo[$activeTheme]);
     $this->assign('themes', $themesInfo);
     $this->assign('defaultThemeImgDir', $defaultThemeImgUrl);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:27,代码来源:themes.php

示例2: processCleanUp

 public function processCleanUp()
 {
     $configs = OW::getConfig()->getValues('cacheextreme');
     //clean template cache
     if ($configs['template_cache']) {
         OW_ViewRenderer::getInstance()->clearCompiledTpl();
     }
     //clean db backend cache
     if ($configs['backend_cache']) {
         OW::getCacheManager()->clean(array(), OW_CacheManager::CLEAN_ALL);
     }
     //clean themes static contents cache
     if ($configs['theme_static']) {
         OW::getThemeManager()->getThemeService()->processAllThemes();
     }
     //clean plugins static contents cache
     if ($configs['plugin_static']) {
         $pluginService = BOL_PluginService::getInstance();
         $activePlugins = $pluginService->findActivePlugins();
         /* @var $pluginDto BOL_Plugin */
         foreach ($activePlugins as $pluginDto) {
             $pluginStaticDir = OW_DIR_PLUGIN . $pluginDto->getModule() . DS . 'static' . DS;
             if (file_exists($pluginStaticDir)) {
                 $staticDir = OW_DIR_STATIC_PLUGIN . $pluginDto->getModule() . DS;
                 if (file_exists($staticDir)) {
                     UTIL_File::removeDir($staticDir);
                 }
                 mkdir($staticDir);
                 chmod($staticDir, 0777);
                 UTIL_File::copyDir($pluginStaticDir, $staticDir);
             }
         }
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:34,代码来源:service.php

示例3: smarty_block_form

/**
 * Smarty form block function.
 *
 * @author Sardar Madumarov <madumarov@gmail.com>
 * @package ow.ow_smarty.plugin
 * @since 1.0
 */
function smarty_block_form($params, $content)
{
    if (!isset($params['name'])) {
        throw new InvalidArgumentException('Empty form name!');
    }
    $vr = OW_ViewRenderer::getInstance();
    $assignedForms = $vr->getAssignedVar('_owForms_');
    if (!isset($assignedForms[$params['name']])) {
        throw new InvalidArgumentException('There is no form with name `' . $params['name'] . '` !');
    }
    // mark active form
    if ($content === null) {
        $vr->assignVar('_owActiveForm_', $assignedForms[$params['name']]);
        return;
    }
    /* @var $form OW_Form */
    $form = $vr->getAssignedVar('_owActiveForm_');
    if (isset($params['decorator'])) {
        $viewRenderer = OW_ViewRenderer::getInstance();
        $viewRenderer->assignVar('formInfo', $form->getElementsInfo());
        $content = $viewRenderer->renderTemplate(OW::getThemeManager()->getDecorator($params['decorator']));
    }
    unset($params['decorator']);
    unset($params['name']);
    return $form->render($content, $params);
}
开发者ID:vazahat,项目名称:dudex,代码行数:33,代码来源:block.form.php

示例4: __construct

 public function __construct(array $arrParams)
 {
     parent::__construct();
     $format = isset($arrParams['format']) ? $arrParams['format'] : null;
     $serviceName = isset($arrParams['service']) ? $arrParams['service'] : null;
     if (null != $serviceName) {
         $params = array();
         $params['limit'] = intval(isset($arrParams['limit']) ? $arrParams['limit'] : YNMEDIAIMPORTER_PER_PAGE);
         $params['offset'] = intval(isset($arrParams['offset']) ? $arrParams['offset'] : 0);
         $params['service'] = $serviceName;
         $params['extra'] = isset($arrParams['extra']) ? $arrParams['extra'] : 'my';
         //Load my photos first with Flickr provider.
         if ($serviceName == 'flickr') {
             $params['media'] = $media = isset($arrParams['media']) ? $arrParams['media'] : 'photo';
         } else {
             $params['media'] = $media = isset($arrParams['media']) ? $arrParams['media'] : 'album';
         }
         $params['aid'] = isset($arrParams['aid']) ? $arrParams['aid'] : 0;
         $params['cache'] = isset($arrParams['cache']) ? $arrParams['cache'] : 1;
         $cache = isset($arrParams['cache']) ? $arrParams['cache'] : 1;
         $jsonParams = json_encode($params);
         $getDataUrl = OW::getRouter()->urlForRoute('ynmediaimporter.getdata');
         $moduleUrl = OW::getRouter()->urlForRoute('ynmediaimporter.index');
         OW::getLanguage()->addKeyForJs('ynmediaimporter', 'message_text_loading');
         $ajaxImageUrl = OW::getThemeManager()->getThemeImagesUrl() . '/ajax_preloader_content.gif';
         $this->assign('ajaxImageUrl', $ajaxImageUrl);
         $this->assign('getDataUrl', $getDataUrl);
         $this->assign('moduleUrl', $moduleUrl);
         $this->assign('jsonParams', $jsonParams);
     } else {
         $this->assign('content', "errors");
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:33,代码来源:media_browse.php

示例5: smarty_function_decorator

/**
 * Decorator block function for smarty templates. 
 *
 * @author Sardar Madumarov <madumarov@gmail.com>
 * @package ow.ow_smarty.plugin
 * @since 1.0
 */
function smarty_function_decorator($params)
{
    if (!isset($params['name'])) {
        throw new InvalidArgumentException('Empty decorator name!');
    }
    return OW::getThemeManager()->processDecorator($params['name'], $params);
}
开发者ID:ZyXelP,项目名称:oxwall,代码行数:14,代码来源:function.decorator.php

示例6: __construct

    public function __construct(BASE_CLASS_WidgetParameter $objParams)
    {
        parent::__construct();
        $uniqName = $objParams->widgetDetails->uniqName;
        $this->assign('uniqName', $uniqName);
        $service = SLIDESHOW_BOL_Service::getInstance();
        $slides = $service->getSlideList($uniqName);
        $this->assign('slides', $slides);
        if ($slides) {
            $url = OW::getPluginManager()->getPlugin('slideshow')->getStaticJsUrl() . 'slides.min.jquery.js';
            OW::getDocument()->addScript($url);
            $settings = $objParams->customParamList;
            $params = array('sizes' => $service->getSizes($slides), 'pagination' => $settings['navigation'] ? "true" : "false", 'interval' => $settings['interval'], 'uniqname' => $uniqName, 'effect' => $settings['effect'], 'preloadImage' => OW::getThemeManager()->getThemeImagesUrl() . '/ajax_preloader_content.gif');
            $url = OW::getPluginManager()->getPlugin('slideshow')->getStaticJsUrl() . 'slideshow.js';
            OW::getDocument()->addScript($url);
            $id = uniqid();
            $script = 'var slideshow' . $id . ' = new slideshow(' . json_encode($params) . '); slideshow' . $id . '.init();';
            if ($objParams->customizeMode) {
                $script .= 'OW.WidgetPanel.bind("move", function(e) {
		            if ( e.widgetName == "' . $uniqName . '" ) {
		               OW.WidgetPanel.reloadWidget("' . $uniqName . '", function(markup, data){});
		            }
		        });';
            }
            OW::getDocument()->addOnloadScript($script);
        }
    }
开发者ID:vazahat,项目名称:dudex,代码行数:27,代码来源:slideshow_widget.php

示例7: __construct

 public function __construct()
 {
     if (!OW::getUser()->isAuthenticated()) {
         $this->setVisible(false);
         return;
     }
     OW::getDocument()->getMasterPage()->setTemplate(OW::getThemeManager()->getMasterPageTemplate(OW_MasterPage::TEMPLATE_BLANK));
 }
开发者ID:vazahat,项目名称:dudex,代码行数:8,代码来源:media_panel.php

示例8: addStatic

    public function addStatic($ajax = false)
    {
        if ($this->staticAdded) {
            return;
        }
        $staticUrl = OW::getPluginManager()->getPlugin(self::PLUGIN_KEY)->getStaticUrl();
        $scriptUrl = $staticUrl . 'equestions.js' . '?' . self::PLUGIN_VERSION;
        $styleUrl = $staticUrl . 'equestions.css' . '?' . self::PLUGIN_VERSION;
        $imagesUrl = OW::getThemeManager()->getThemeImagesUrl();
        $css = 'html body div .q_ic_preloader { background-image: url(' . $imagesUrl . 'ajax_preloader_button.gif) };';
        OW::getDocument()->addStyleDeclaration($css);
        if (!$ajax) {
            OW::getDocument()->addScript($scriptUrl);
            OW::getDocument()->addStyleSheet($styleUrl);
        } else {
            OW::getDocument()->addOnloadScript(UTIL_JsGenerator::composeJsString('
                if ( !window.QUESTIONS_Loaded )
                {

                    OW.addScriptFiles([{$scriptUrl}], function(){
                        if ( window.EQAjaxLoadCallbacksRun )
                        {
                            window.EQAjaxLoadCallbacksRun();
                        }
                    });
                    OW.addCssFile({$styleUrl});

                 }
            ', array('styleUrl' => $styleUrl, 'scriptUrl' => $scriptUrl)));
        }
        $messages = EQUESTIONS_CLASS_CreditsBridge::getInstance()->getAllPermissionMessages();
        $actions = EQUESTIONS_CLASS_CreditsBridge::getInstance()->getAllPermissions();
        $js = UTIL_JsGenerator::newInstance();
        $js->addScript(UTIL_JsGenerator::composeJsString('UTILS.Credits = new UTILS.CreditsConstructor({$actions}, {$messages}); ', array('messages' => $messages, 'actions' => $actions)));
        $friendMode = (bool) OW::getEventManager()->call('plugin.friends');
        $js->setVariable(array('QUESTIONS', 'friendMode'), $friendMode);
        if (!$ajax) {
            OW::getDocument()->addOnloadScript($js);
        } else {
            OW::getDocument()->addOnloadScript('window.EQAjaxLoadCallbackQueue = [];');
            OW::getDocument()->addOnloadScript('(function() {
                var loaded = function() {
                    ' . $js->generateJs() . '
                };

                if ( window.QUESTIONS_Loaded )
                    loaded.call();
                else
                    window.EQAjaxLoadCallbackQueue.push(loaded);
            })();');
        }
        OW::getLanguage()->addKeyForJs('equestions', 'selector_title_friends');
        OW::getLanguage()->addKeyForJs('equestions', 'selector_title_users');
        OW::getLanguage()->addKeyForJs('equestions', 'followers_fb_title');
        OW::getLanguage()->addKeyForJs('equestions', 'toolbar_unfollow_btn');
        OW::getLanguage()->addKeyForJs('equestions', 'toolbar_follow_btn');
        $this->staticAdded = true;
    }
开发者ID:vazahat,项目名称:dudex,代码行数:58,代码来源:plugin.php

示例9: __construct

 public function __construct()
 {
     if (!OW::getUser()->isAuthenticated()) {
         $this->setVisible(false);
         return;
     }
     OW::getDocument()->getMasterPage()->setTemplate(OW::getThemeManager()->getMasterPageTemplate(OW_MasterPage::TEMPLATE_BLANK));
     OW::getDocument()->addStyleDeclaration(".ow_footer{display:none;}");
 }
开发者ID:hardikamutech,项目名称:hammu,代码行数:9,代码来源:media_panel.php

示例10: onBeforeRender

 public function onBeforeRender()
 {
     parent::onBeforeRender();
     if (!empty($this->vars['info']['route'])) {
         $this->vars['info']['url'] = $this->getUrl($this->vars['info']['route']);
     }
     $this->vars['blankImg'] = OW::getThemeManager()->getCurrentTheme()->getStaticUrl() . 'mobile/images/1px.png';
     $this->assign('vars', $this->vars);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:9,代码来源:image.php

示例11: smarty_block_block_decorator

/**
 * Decorator block function for smarty templates. 
 *
 * @author Sardar Madumarov <madumarov@gmail.com>
 * @package ow.ow_smarty.plugin
 * @since 1.0
 */
function smarty_block_block_decorator($params, $content)
{
    if (!isset($params['name'])) {
        throw new InvalidArgumentException('Empty decorator name!');
    }
    if ($content === null) {
        return;
    }
    return OW::getThemeManager()->processBlockDecorator($params['name'], $params, $content);
}
开发者ID:vazahat,项目名称:dudex,代码行数:17,代码来源:block.block_decorator.php

示例12: __construct

 private function __construct()
 {
     $this->service = UHEADER_BOL_Service::getInstance();
     $this->plugin = OW::getPluginManager()->getPlugin('uheader');
     //66 - for 1000px themes
     //84 - for 780px themes
     $scale = (OW::getThemeManager()->getSelectedTheme()->getDto()->sidebarPosition == "none" ? 69 : 88) / 100;
     $this->config = OW::getConfig()->getValues("uheader");
     $this->config["cover_height"] *= $scale;
 }
开发者ID:vazahat,项目名称:dudex,代码行数:10,代码来源:templates_bridge.php

示例13: smarty_function_user_avatar

/**
 * Smarty user avatar function.
 *
 * @author Sardar Madumarov <madumarov@gmail.com>
 * @package ow.ow_smarty.plugin
 * @since 1.0
 */
function smarty_function_user_avatar($params, $smarty)
{
    if (empty($params['userId'])) {
        return '_EMPTY_USER_ID_';
    }
    $decoratorParams = BOL_AvatarService::getInstance()->getDataForUserAvatars(array($params['userId']));
    if (empty($decoratorParams)) {
        return '_USER_NOT_FOUND_';
    }
    return OW::getThemeManager()->processDecorator('avatar_item', $decoratorParams[$params['userId']]);
}
开发者ID:ZyXelP,项目名称:oxwall,代码行数:18,代码来源:function.user_avatar.php

示例14: onBeforeRender

 public function onBeforeRender()
 {
     if ($this->getTemplate() === null) {
         $this->setTemplate(OW::getThemeManager()->getMasterPageTemplate(self::TEMPLATE_GENERAL));
     }
     $this->addComponent("signIn", new BASE_MCMP_SignIn());
     $this->addComponent("topMenu", new BASE_MCMP_TopMenu());
     $this->addComponent("bottomMenu", new BASE_MCMP_BottomMenu());
     $this->assign("buttonData", $this->buttonData);
     parent::onBeforeRender();
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:11,代码来源:mobile_master_page.php

示例15: index

 public function index($params = NULL)
 {
     if (!$this->service->isLocked()) {
         $this->redirect(OW_URL_HOME);
     }
     OW::getDocument()->setJavaScripts(array('added' => array()));
     $configs = OW::getConfig()->getValues('antibruteforce');
     $this->setPageTitle($configs['lock_title']);
     $this->assign('configs', $configs);
     $masterPageFileDir = OW::getThemeManager()->getMasterPageTemplate('blank');
     OW::getDocument()->getMasterPage()->setTemplate($masterPageFileDir);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:12,代码来源:antibruteforce.php


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