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


PHP BOL_ComponentAdminService::getInstance方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     $this->componentAdminService = BOL_ComponentAdminService::getInstance();
     $this->componentEntityService = BOL_ComponentEntityService::getInstance();
     $controllersTemplate = OW::getPluginManager()->getPlugin('BASE')->getCtrlViewDir() . 'component_panel.html';
     $this->setTemplate($controllersTemplate);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:7,代码来源:component_panel.php

示例2: __construct

 public function __construct($placeName, array $componentList, $template = 'drag_and_drop_panel')
 {
     parent::__construct($placeName, $componentList, $template);
     $customizeAllowed = BOL_ComponentAdminService::getInstance()->findPlace($placeName)->editableByUser;
     $this->assign('customizeAllowed', $customizeAllowed);
     $this->assign('placeName', $placeName);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:drag_and_drop_admin_panel.php

示例3: dashboard

 public function dashboard($paramList)
 {
     $this->setPageHeading(OW::getLanguage()->text('admin', 'admin_dashboard'));
     $this->setPageHeadingIconClass('ow_ic_dashboard');
     $place = BOL_ComponentAdminService::PLASE_ADMIN_DASHBOARD;
     $customize = !empty($paramList['mode']) && $paramList['mode'] == 'customize';
     $service = BOL_ComponentAdminService::getInstance();
     $schemeList = $service->findSchemeList();
     $state = $service->findCache($place);
     if (empty($state)) {
         $state = array();
         $state['defaultComponents'] = $service->findPlaceComponentList($place);
         $state['defaultPositions'] = $service->findAllPositionList($place);
         $state['defaultSettings'] = $service->findAllSettingList();
         $state['defaultScheme'] = (array) $service->findSchemeByPlace($place);
         $service->saveCache($place, $state);
     }
     if (empty($state['defaultScheme']) && !empty($schemeList)) {
         $state['defaultScheme'] = reset($schemeList);
     }
     $componentPanel = new ADMIN_CMP_DashboardWidgetPage($place, $state['defaultComponents'], $customize);
     $componentPanel->allowCustomize(true);
     $customizeUrls = array('customize' => OW::getRouter()->urlForRoute('admin_dashboard_customize', array('mode' => 'customize')), 'normal' => OW::getRouter()->urlForRoute('admin_dashboard'));
     $componentPanel->customizeControlCunfigure($customizeUrls['customize'], $customizeUrls['normal']);
     $componentPanel->setSchemeList($schemeList);
     $componentPanel->setPositionList($state['defaultPositions']);
     $componentPanel->setSettingList($state['defaultSettings']);
     $componentPanel->setScheme($state['defaultScheme']);
     $this->addComponent('componentPanel', $componentPanel);
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:30,代码来源:base.php

示例4: panel

 public function panel()
 {
     $componentService = BOL_ComponentAdminService::getInstance();
     $this->setPageHeading(OW::getLanguage()->text('groups', 'widgets_panel_heading'));
     $this->setPageHeadingIconClass('ow_ic_dashboard');
     $place = GROUPS_BOL_Service::WIDGET_PANEL_NAME;
     $dbSettings = $componentService->findAllSettingList();
     $dbPositions = $componentService->findAllPositionList($place);
     $dbComponents = $componentService->findPlaceComponentList($place);
     $activeScheme = $componentService->findSchemeByPlace($place);
     $schemeList = $componentService->findSchemeList();
     if (empty($activeScheme) && !empty($schemeList)) {
         $activeScheme = reset($schemeList);
     }
     $componentPanel = new ADMIN_CMP_DragAndDropAdminPanel($place, $dbComponents);
     $componentPanel->setPositionList($dbPositions);
     $componentPanel->setSettingList($dbSettings);
     $componentPanel->setSchemeList($schemeList);
     if (!empty($activeScheme)) {
         $componentPanel->setScheme($activeScheme);
     }
     $menu = $this->getMenu();
     $this->addComponent('menu', $menu);
     $this->assign('componentPanel', $componentPanel->render());
 }
开发者ID:vazahat,项目名称:dudex,代码行数:25,代码来源:admin.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->service = BOL_ComponentAdminService::getInstance();
     $this->fetchFromCache();
     OW_ViewRenderer::getInstance()->registerFunction('sb_component', array($this, 'tplComponent'));
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:sidebar.php

示例6: __construct

 public function __construct($placeName, array $componentList, $template)
 {
     parent::__construct($placeName, $componentList, $template);
     $jsDragAndDropUrl = OW::getPluginManager()->getPlugin('ADMIN')->getStaticJsUrl() . 'drag_and_drop.js';
     OW::getDocument()->addScript($jsDragAndDropUrl);
     $customizeAllowed = BOL_ComponentAdminService::getInstance()->findPlace($placeName);
     $this->assign('customizeAllowed', $customizeAllowed);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:8,代码来源:drag_and_drop_admin_panel.php

示例7: getBoxParmList

 private function getBoxParmList($groupId)
 {
     $settings = GROUPS_CMP_BriefInfoWidget::getStandardSettingValueList();
     $defaultSettings = BOL_ComponentAdminService::getInstance()->findSettingList('group-GROUPS_CMP_BriefInfoWidget');
     $customSettings = BOL_ComponentEntityService::getInstance()->findSettingList('group-GROUPS_CMP_BriefInfoWidget', $groupId);
     $out = array_merge($settings, $defaultSettings, $customSettings);
     $out['type'] = $out['wrap_in_box'] ? '' : 'empty';
     return $out;
 }
开发者ID:vazahat,项目名称:dudex,代码行数:9,代码来源:brief_info.php

示例8: init

 /**
  * @see OW_ActionController::init()
  *
  */
 public function init()
 {
     parent::init();
     $this->registerAction('allowCustomize', array($this, 'allowCustomize'));
     if (!OW::getUser()->isAdmin()) {
         throw new Redirect404Exception();
     }
     $this->componentService = BOL_ComponentAdminService::getInstance();
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:13,代码来源:ajax_component_admin_panel.php

示例9: grouprss_add_widget

function grouprss_add_widget(OW_Event $event)
{
    $params = $event->getParams();
    if (!isset($params['place']) || !isset($params['section'])) {
        return;
    }
    try {
        $widgetService = BOL_ComponentAdminService::getInstance();
        $widget = $widgetService->addWidget('GROUPRSS_CMP_ManageFeedsWidget', false);
        $placeWidget = $widgetService->addWidgetToPlace($widget, $params['place']);
        $widgetService->addWidgetToPosition($placeWidget, $params['section'], 0);
    } catch (Exception $e) {
    }
}
开发者ID:vazahat,项目名称:dudex,代码行数:14,代码来源:init.php

示例10: pcgallery_before_plugin_deactivate

function pcgallery_before_plugin_deactivate(OW_Event $e)
{
    $params = $e->getParams();
    $pluginKey = $params['pluginKey'];
    if ($pluginKey != 'photo') {
        return;
    }
    $widgetService = BOL_ComponentAdminService::getInstance();
    $widget = $widgetService->addWidget('BASE_CMP_UserAvatarWidget', false);
    $widgetPlace = $widgetService->addWidgetToPlace($widget, BOL_ComponentService::PLACE_PROFILE);
    try {
        $widgetService->addWidgetToPosition($widgetPlace, BOL_ComponentService::SECTION_LEFT, 0);
    } catch (Exception $e) {
    }
}
开发者ID:hardikamutech,项目名称:hammu,代码行数:15,代码来源:init.php

示例11: uninstall

 public function uninstall()
 {
     if (isset($_POST['action']) && $_POST['action'] == 'delete_content') {
         $service = SLIDESHOW_BOL_Service::getInstance();
         $list = $service->getAllSlideList();
         if ($list) {
             foreach ($list as $slide) {
                 $service->addSlideToDeleteQueue($slide->id);
             }
         }
         OW::getConfig()->saveConfig('slideshow', 'uninstall_inprogress', 1);
         BOL_ComponentAdminService::getInstance()->deleteWidget('SLIDESHOW_CMP_SlideshowWidget');
         OW::getFeedback()->info(OW::getLanguage()->text('slideshow', 'plugin_set_for_uninstall'));
         $this->redirect();
     }
     $this->setPageHeading(OW::getLanguage()->text('slideshow', 'page_title_uninstall'));
     $this->setPageHeadingIconClass('ow_ic_delete');
     $this->assign('inprogress', (bool) OW::getConfig()->getValue('slideshow', 'uninstall_inprogress'));
     $js = new UTIL_JsGenerator();
     $js->jQueryEvent('#btn-delete-content', 'click', 'if ( !confirm("' . OW::getLanguage()->text('slideshow', 'confirm_delete_plugin') . '") ) return false;');
     OW::getDocument()->addOnloadScript($js);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:22,代码来源:admin.php

示例12:

<?php

/**
 * This software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ and is
 * licensed under The BSD license.
 * ---
 * Copyright (c) 2011, Oxwall Foundation
 * All rights reserved.
 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
 * following conditions are met:
 *
 *  - Redistributions of source code must retain the above copyright notice, this list of conditions and
 *  the following disclaimer.
 *
 *  - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
 *  the following disclaimer in the documentation and/or other materials provided with the distribution.
 *
 *  - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products
 *  derived from this software without specific prior written permission.
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
OW::getNavigation()->deleteMenuItem('forum', 'forum');
$widget = BOL_ComponentAdminService::getInstance()->deleteWidget('FORUM_CMP_ForumTopicsWidget');
$widget = BOL_ComponentAdminService::getInstance()->deleteWidget('FORUM_CMP_LatestTopicsWidget');
开发者ID:vazahat,项目名称:dudex,代码行数:30,代码来源:deactivate.php

示例13:

<?php

/**
 * Copyright (c) 2014, Skalfa LLC
 * All rights reserved.
 * 
 * ATTENTION: This commercial software is intended for exclusive use with SkaDate Dating Software (http://www.skadate.com) and is licensed under SkaDate Exclusive License by Skalfa LLC.
 * 
 * Full text of this license can be found at http://www.skadate.com/sel.pdf
 */
BOL_ComponentAdminService::getInstance()->deleteWidget('SKADATE_CMP_MobileExperience');
开发者ID:hardikamutech,项目名称:loov,代码行数:11,代码来源:deactivate.php

示例14: reloadComponent

 protected function reloadComponent($data)
 {
     $componentUniqName = $data['componentId'];
     $renderView = !empty($data['render']);
     $entity = $data['entity'];
     $componentPlace = $this->componentService->findComponentPlace($componentUniqName, $entity);
     $component = $this->componentService->findComponent($componentPlace->componentId);
     $defaultSettingList = BOL_ComponentAdminService::getInstance()->findSettingList($componentUniqName);
     $entitySettingList = $this->componentService->findSettingList($componentUniqName, $entity);
     $viewInstance = new BASE_CMP_DragAndDropItem($componentUniqName, (bool) $componentPlace->clone, 'drag_and_drop_item_customize');
     $viewInstance->setSettingList($defaultSettingList, $entitySettingList);
     $viewInstance->componentParamObject->additionalParamList = $data['additionalSettings'];
     $viewInstance->componentParamObject->customizeMode = true;
     $viewInstance->setContentComponentClass($component->className);
     return $this->getComponentMarkup($viewInstance, $renderView);
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:16,代码来源:ajax_component_entity_panel.php

示例15: view

 public function view($params)
 {
     $groupId = (int) $params['groupId'];
     if (empty($groupId)) {
         throw new Redirect404Exception();
     }
     $groupDto = $this->service->findGroupById($groupId);
     if ($groupDto === null) {
         throw new Redirect404Exception();
     }
     OW::getDocument()->addMetaInfo('og:title', htmlspecialchars($groupDto->title), 'property');
     OW::getDocument()->addMetaInfo('og:description', htmlspecialchars($groupDto->description), 'property');
     OW::getDocument()->addMetaInfo('og:url', OW_URL_HOME . OW::getRequest()->getRequestUri(), 'property');
     OW::getDocument()->addMetaInfo('og:site_name', OW::getConfig()->getValue('base', 'site_name'), 'property');
     $language = OW::getLanguage();
     if (!$this->service->isCurrentUserCanView($groupDto->userId)) {
         $this->assign('permissionMessage', $language->text('groups', 'view_no_permission'));
         return;
     }
     $invite = $this->service->findInvite($groupDto->id, OW::getUser()->getId());
     if ($invite !== null) {
         OW::getRegistry()->set('groups.hide_console_invite_item', true);
         $this->service->markInviteAsViewed($groupDto->id, OW::getUser()->getId());
     }
     if ($groupDto->whoCanView == GROUPS_BOL_Service::WCV_INVITE && !OW::getUser()->isAuthorized('groups')) {
         if (!OW::getUser()->isAuthenticated()) {
             $this->redirect(OW::getRouter()->urlForRoute('groups-private-group', array('groupId' => $groupDto->id)));
         }
         $user = $this->service->findUser($groupDto->id, OW::getUser()->getId());
         if ($groupDto->whoCanView == GROUPS_BOL_Service::WCV_INVITE && $invite === null && $user === null) {
             $this->redirect(OW::getRouter()->urlForRoute('groups-private-group', array('groupId' => $groupDto->id)));
         }
     }
     OW::getDocument()->setTitle($language->text('groups', 'view_page_title', array('group_name' => strip_tags($groupDto->title))));
     OW::getDocument()->setDescription($language->text('groups', 'view_page_description', array('description' => UTIL_String::truncate(strip_tags($groupDto->description), 200))));
     $place = 'group';
     $customizeUrls = array('customize' => OW::getRouter()->urlForRoute('groups-customize', array('mode' => 'customize', 'groupId' => $groupId)), 'normal' => OW::getRouter()->urlForRoute('groups-view', array('groupId' => $groupId)));
     $componentAdminService = BOL_ComponentAdminService::getInstance();
     $componentEntityService = BOL_ComponentEntityService::getInstance();
     $userCustomizeAllowed = $componentAdminService->findPlace($place)->editableByUser;
     $ownerMode = $groupDto->userId == OW::getUser()->getId();
     $customize = !empty($params['mode']) && $params['mode'] == 'customize';
     if (!($userCustomizeAllowed && $ownerMode) && $customize) {
         $this->redirect($customizeUrls['normal']);
     }
     $template = $customize ? 'drag_and_drop_entity_panel_customize' : 'drag_and_drop_entity_panel';
     $schemeList = $componentAdminService->findSchemeList();
     $defaultScheme = $componentAdminService->findSchemeByPlace($place);
     if (empty($defaultScheme) && !empty($schemeList)) {
         $defaultScheme = reset($schemeList);
     }
     if (!$componentAdminService->isCacheExists($place)) {
         $state = array();
         $state['defaultComponents'] = $componentAdminService->findPlaceComponentList($place);
         $state['defaultPositions'] = $componentAdminService->findAllPositionList($place);
         $state['defaultSettings'] = $componentAdminService->findAllSettingList();
         $state['defaultScheme'] = $defaultScheme;
         $componentAdminService->saveCache($place, $state);
     }
     $state = $componentAdminService->findCache($place);
     $defaultComponents = $state['defaultComponents'];
     $defaultPositions = $state['defaultPositions'];
     $defaultSettings = $state['defaultSettings'];
     $defaultScheme = $state['defaultScheme'];
     if ($userCustomizeAllowed) {
         if (!$componentEntityService->isEntityCacheExists($place, $groupId)) {
             $entityCache = array();
             $entityCache['entityComponents'] = $componentEntityService->findPlaceComponentList($place, $groupId);
             $entityCache['entitySettings'] = $componentEntityService->findAllSettingList($groupId);
             $entityCache['entityPositions'] = $componentEntityService->findAllPositionList($place, $groupId);
             $componentEntityService->saveEntityCache($place, $groupId, $entityCache);
         }
         $entityCache = $componentEntityService->findEntityCache($place, $groupId);
         $entityComponents = $entityCache['entityComponents'];
         $entitySettings = $entityCache['entitySettings'];
         $entityPositions = $entityCache['entityPositions'];
     } else {
         $entityComponents = array();
         $entitySettings = array();
         $entityPositions = array();
     }
     $componentPanel = new BASE_CMP_DragAndDropEntityPanel($place, $groupId, $defaultComponents, $customize, $template);
     $componentPanel->setAdditionalSettingList(array('entityId' => $groupId, 'entity' => 'groups'));
     if ($ownerMode) {
         $componentPanel->allowCustomize($userCustomizeAllowed);
         $componentPanel->customizeControlCunfigure($customizeUrls['customize'], $customizeUrls['normal']);
     }
     $componentPanel->setSchemeList($schemeList);
     $componentPanel->setPositionList($defaultPositions);
     $componentPanel->setSettingList($defaultSettings);
     $componentPanel->setScheme($defaultScheme);
     /*
              * This feature was disabled for users
              * if ( !empty($userScheme) )
               {
               $componentPanel->setUserScheme($userScheme);
               } */
     if (!empty($entityComponents)) {
         $componentPanel->setEntityComponentList($entityComponents);
     }
//.........这里部分代码省略.........
开发者ID:vazahat,项目名称:dudex,代码行数:101,代码来源:groups.php


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