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


PHP OW::getPluginManager方法代码示例

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


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

示例1: index

 public function index(array $params)
 {
     if (!($userId = OW::getUser()->getId())) {
         throw new AuthenticateException();
     }
     $page = !empty($_GET['page']) && intval($_GET['page']) > 0 ? $_GET['page'] : 1;
     $lang = OW::getLanguage();
     $perPage = (int) OW::getConfig()->getValue('base', OW::getPluginManager()->isPluginActive('skadate') ? 'users_on_page' : 'users_count_on_page');
     $guests = OCSGUESTS_BOL_Service::getInstance()->findGuestsForUser($userId, $page, $perPage);
     $guestList = array();
     if ($guests) {
         foreach ($guests as $guest) {
             $guestList[$guest->guestId] = array('last_visit' => $lang->text('ocsguests', 'visited') . ' ' . '<span class="ow_remark">' . $guest->visitTimestamp . '</span>');
         }
         $itemCount = OCSGUESTS_BOL_Service::getInstance()->countGuestsForUser($userId);
         if (OW::getPluginManager()->isPluginActive('skadate')) {
             $cmp = OW::getClassInstance('BASE_CMP_Users', $guestList, array(), $itemCount);
         } else {
             $guestsUsers = OCSGUESTS_BOL_Service::getInstance()->findGuestUsers($userId, $page, $perPage);
             $cmp = new OCSGUESTS_CMP_Users($guestsUsers, $itemCount, $perPage, true, $guestList);
         }
         $this->addComponent('guests', $cmp);
     } else {
         $this->assign('guests', null);
     }
     $this->setPageHeading($lang->text('ocsguests', 'viewed_profile'));
     $this->setPageTitle($lang->text('ocsguests', 'viewed_profile'));
     OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'base', 'dashboard');
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:29,代码来源:list.php

示例2: getMenu

 public function getMenu()
 {
     $language = OW::getLanguage();
     $menu = new BASE_CMP_ContentMenu();
     $menuItem = new BASE_MenuItem();
     $menuItem->setKey('all');
     $menuItem->setPrefix('questions');
     $menuItem->setLabel($language->text('equestions', 'list_all_tab'));
     $menuItem->setOrder(1);
     $menuItem->setUrl(OW::getRouter()->urlForRoute('equestions-all'));
     $menuItem->setIconClass('ow_ic_lens');
     $menu->addElement($menuItem);
     if (OW::getUser()->isAuthenticated()) {
         if (OW::getPluginManager()->isPluginActive('friends')) {
             $menuItem = new BASE_MenuItem();
             $menuItem->setKey('friends');
             $menuItem->setPrefix('questions');
             $menuItem->setLabel($language->text('equestions', 'list_friends_tab'));
             $menuItem->setOrder(2);
             $menuItem->setUrl(OW::getRouter()->urlForRoute('equestions-friends'));
             $menuItem->setIconClass('ow_ic_user');
             $menu->addElement($menuItem);
         }
         $menuItem = new BASE_MenuItem();
         $menuItem->setKey('my');
         $menuItem->setPrefix('questions');
         $menuItem->setLabel($language->text('equestions', 'list_my_tab'));
         $menuItem->setOrder(3);
         $menuItem->setUrl(OW::getRouter()->urlForRoute('equestions-my'));
         $menuItem->setIconClass('ow_ic_user');
         $menu->addElement($menuItem);
     }
     return $menu;
 }
开发者ID:vazahat,项目名称:dudex,代码行数:34,代码来源:feed_menu.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $plugin = OW::getPluginManager()->getPlugin('BASE');
     $this->setTemplate($plugin->getCmpViewDir() . 'console_list_ipc_item.html');
     $this->addClass('ow_invitation_item ow_cursor_default');
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:invitation_item.php

示例4: __construct

 public function __construct($label, $key = null)
 {
     parent::__construct($label, $key);
     $template = OW::getPluginManager()->getPlugin('BASE')->getCmpViewDir() . 'console_dropdown_click.html';
     $this->setTemplate($template);
     $this->addClass('ow_console_dropdown_click');
 }
开发者ID:vazahat,项目名称:dudex,代码行数:7,代码来源:console_dropdown_click.php

示例5: __construct

 /**
  * @return Constructor.
  */
 public function __construct(BASE_CLASS_WidgetParameter $params)
 {
     parent::__construct();
     $this->setTemplate(OW::getPluginManager()->getPlugin('base')->getCmpViewDir() . 'users_widget.html');
     $randId = UTIL_HtmlTag::generateAutoId('base_users_widget');
     $this->assign('widgetId', $randId);
     $data = $this->getData($params);
     $menuItems = array();
     $dataToAssign = array();
     if (!empty($data)) {
         foreach ($data as $key => $item) {
             $contId = "{$randId}_users_widget_{$key}";
             $toolbarId = !empty($item['toolbar']) ? "{$randId}_toolbar_{$key}" : false;
             $menuItems[$key] = array('label' => $item['menu-label'], 'id' => "{$randId}_users_widget_menu_{$key}", 'contId' => $contId, 'active' => !empty($item['menu_active']), 'toolbarId' => $toolbarId);
             $usersCmp = $this->getUsersCmp($item['userIds']);
             $dataToAssign[$key] = array('users' => $usersCmp->render(), 'active' => !empty($item['menu_active']), 'toolbar' => !empty($item['toolbar']) ? $item['toolbar'] : array(), 'toolbarId' => $toolbarId, 'contId' => $contId);
         }
     }
     $this->assign('data', $dataToAssign);
     $displayMenu = true;
     if (count($data) == 1 && !$this->forceDisplayMenu) {
         $displayMenu = false;
     }
     if (!$params->customizeMode && (count($data) != 1 || $this->forceDisplayMenu)) {
         $menu = $this->getMenuCmp($menuItems);
         if (!empty($menu)) {
             $this->addComponent('menu', $menu);
         }
     }
 }
开发者ID:vazahat,项目名称:dudex,代码行数:33,代码来源:users_widget.php

示例6: addStatic

    public function addStatic($onloadJs = '')
    {
        static $fistCall = true;
        $staticUrl = OW::getPluginManager()->getPlugin('attachments')->getStaticUrl();
        OW::getDocument()->addStyleSheet($staticUrl . 'styles.css' . '?' . self::PLUGIN_VERSION);
        if ($fistCall) {
            if (OW::getRequest()->isAjax()) {
                OW::getDocument()->addOnloadScript('window.ATTPAjaxLoadCallbackQueue = [];');
                OW::getDocument()->addOnloadScript(UTIL_JsGenerator::composeJsString('
                    if ( !window.ATTP ) OW.addScriptFiles([{$url}]);
                ', array('url' => $staticUrl . 'scripts.js' . '?' . self::PLUGIN_VERSION)));
            } else {
                OW::getDocument()->addScript($staticUrl . 'scripts.js' . '?' . self::PLUGIN_VERSION);
                if (!empty($onloadJs)) {
                    OW::getDocument()->addOnloadScript($onloadJs);
                }
                return;
            }
        }
        $fistCall = false;
        OW::getDocument()->addOnloadScript('(function() {
            var loaded = function() {
                ' . $onloadJs . '
            };

            if ( window.ATTP )
                loaded.call();
            else
                window.ATTPAjaxLoadCallbackQueue.push(loaded);
        })();');
    }
开发者ID:vazahat,项目名称:dudex,代码行数:31,代码来源:plugin.php

示例7: __construct

 public function __construct($list, $showOnline = true)
 {
     parent::__construct();
     $this->list = $list;
     $this->showOnline = $showOnline;
     $this->setTemplate(OW::getPluginManager()->getPlugin('base')->getMobileCmpViewDir() . 'user_list.html');
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:7,代码来源:user_list.php

示例8: hotlist_usercredits_active

function hotlist_usercredits_active(BASE_CLASS_EventCollector $event)
{
    if (!OW::getPluginManager()->isPluginActive('usercredits')) {
        $language = OW::getLanguage();
        $event->add($language->text('hotlist', 'error_usercredits_not_installed'));
    }
}
开发者ID:hardikamutech,项目名称:loov,代码行数:7,代码来源:init.php

示例9: addPhoto

 public function addPhoto($userId, $path, $title, $text = null, $addToFeed = true)
 {
     if (!$this->isActive()) {
         return null;
     }
     $pluginfilesDir = OW::getPluginManager()->getPlugin('attachments')->getPluginFilesDir();
     $filePath = $pluginfilesDir . uniqid('tmp_') . '.jpg';
     if (!@copy($path, $filePath)) {
         return null;
     }
     $description = empty($title) ? $text : $title;
     $description = empty($description) ? null : $description;
     $data = OW::getEventManager()->call("photo.add", array("albumId" => $this->getAlbum($userId), "path" => $filePath, "description" => $description, "addToFeed" => false));
     @unlink($filePath);
     if (empty($data["photoId"])) {
         return null;
     }
     $photoId = $data["photoId"];
     if ($addToFeed) {
         //Newsfeed
         $event = new OW_Event('feed.action', array('pluginKey' => 'photo', 'entityType' => 'photo_comments', 'entityId' => $photoId, 'userId' => $userId), array("content" => array("vars" => array("status" => $text))));
         OW::getEventManager()->trigger($event);
     }
     return $photoId;
 }
开发者ID:vazahat,项目名称:dudex,代码行数:25,代码来源:photo_bridge.php

示例10: initMenu

 public function initMenu()
 {
     $menuItems = array();
     $listNames = array('connects' => array('iconClass' => 'ow_yn_socialbridge_connects'));
     $listNames = array('connects' => array('iconClass' => 'ow_yn_socialbridge_connects'));
     if (OW::getPluginManager()->isPluginActive('ynsocialstream')) {
         $listNames['stream-settings'] = array('iconClass' => 'ow_yn_socialstream');
     }
     if (OW::getPluginManager()->isPluginActive('ynsocialpublisher')) {
         $listNames['publisher-settings'] = array('iconClass' => 'ow_yn_socialpublisher');
     }
     $count = 0;
     foreach ($listNames as $actionKey => $actionArr) {
         $menuItem = new BASE_MenuItem();
         $menuItem->setKey($actionKey);
         $menuItem->setUrl(OW::getRouter()->urlForRoute('ynsocialbridge-' . $actionKey));
         $menuItem->setOrder($count);
         $menuItem->setLabel(OW::getLanguage()->text('ynsocialbridge', 'menu_item_' . $actionKey));
         $menuItem->setIconClass($actionArr['iconClass']);
         $menuItems[] = $menuItem;
         $count++;
     }
     $contentMenu = new BASE_CMP_ContentMenu($menuItems);
     return $contentMenu;
 }
开发者ID:vazahat,项目名称:dudex,代码行数:25,代码来源:core.php

示例11: rated

 public function rated()
 {
     if (!OW::getUser()->isAuthenticated()) {
         throw new AuthenticateException();
     }
     $lang = OW::getLanguage();
     $page = !empty($_GET['page']) && intval($_GET['page']) > 0 ? $_GET['page'] : 1;
     $perPage = (int) OW::getConfig()->getValue('base', 'users_count_on_page');
     $service = OCSTOPUSERS_BOL_Service::getInstance();
     $userId = OW::getUser()->getId();
     $users = $service->findRateUserList($userId, $page, $perPage);
     if ($users) {
         $count = $service->countRateUsers($userId);
         $list = array();
         $fields = array();
         foreach ($users as $user) {
             $list[] = $user['dto'];
             $fields[$user['dto']->id] = array('score' => $user['score'], 'timeStamp' => $user['timeStamp']);
         }
         $cmp = new OCSTOPUSERS_CMP_RatedList($list, $count, $perPage, false, $fields);
         $this->addComponent('users', $cmp);
     } else {
         $this->assign($users, null);
     }
     OW::getDocument()->setHeading($lang->text('ocstopusers', 'rated_me'));
     OW::getDocument()->setHeadingIconClass('ow_ic_star');
     OW::getNavigation()->activateMenuItem(BOL_NavigationService::MENU_TYPE_MAIN, 'base', 'users_main_menu_item');
     $this->setTemplate(OW::getPluginManager()->getPlugin('ocstopusers')->getCtrlViewDir() . 'list_index.html');
 }
开发者ID:jorgemunoz8807,项目名称:havanabook,代码行数:29,代码来源:list.php

示例12: getList

 public function getList(array $params)
 {
     OW::getDocument()->setHeading(OW::getLanguage()->text('bookmarks', 'list_headint_title'));
     $this->setTemplate(OW::getPluginManager()->getPlugin('bookmarks')->getCtrlViewDir() . 'list.html');
     $userId = OW::getUser()->getId();
     $page = !empty($_GET['page']) && intval($_GET['page']) > 0 ? $_GET['page'] : 1;
     $userOnPage = (int) OW::getConfig()->getValue('base', 'users_on_page');
     $first = ($page - 1) * $userOnPage;
     $list = $this->service->findBookmarksUserIdList($userId, $first, $userOnPage, $params['category']);
     $count = $this->service->findBookmarksCount($userId, $params['category']);
     $sexValue = array();
     $userDataList = array();
     $questionService = BOL_QuestionService::getInstance();
     $data = $questionService->getQuestionData($list, array('sex', 'googlemap_location', 'birthdate'));
     foreach (BOL_QuestionValueDao::getInstance()->findQuestionValues('sex') as $sexDto) {
         $sexValue[$sexDto->value] = $questionService->getQuestionValueLang('sex', $sexDto->value);
     }
     foreach ($data as $userId => $user) {
         if (isset($user['birthdate'])) {
             $date = UTIL_DateTime::parseDate($user['birthdate'], UTIL_DateTime::MYSQL_DATETIME_DATE_FORMAT);
             $age = UTIL_DateTime::getAge($date['year'], $date['month'], $date['day']);
         } else {
             $age = '';
         }
         $userDataList[$userId] = array('info_gender' => !empty($user['sex']) && !empty($sexValue[$user['sex']]) ? $sexValue[$user['sex']] : '' . ' ' . $age, 'location' => !empty($user['googlemap_location']) ? $user['googlemap_location']['address'] : '');
     }
     $this->addComponent('list', OW::getClassInstance('BASE_CMP_Users', $userDataList, array(), $count));
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:28,代码来源:list.php

示例13: index

 /**
  * Default action
  */
 public function index()
 {
     $lang = OW::getLanguage();
     OW::getDocument()->setHeading($lang->text('ocssitestats', 'admin_page_heading'));
     OW::getDocument()->setHeadingIconClass('ow_ic_gear_wheel');
     $pluginManager = OW::getPluginManager();
     $pluginsActivated = array('total_users' => true, 'online_users' => true, 'new_users_today' => true, 'new_users_this_month' => true, 'photos' => $pluginManager->isPluginActive('photo'), 'videos' => $pluginManager->isPluginActive('video'), 'blogs' => $pluginManager->isPluginActive('blogs'), 'groups' => $pluginManager->isPluginActive('groups'), 'events' => $pluginManager->isPluginActive('event'), 'discussions' => $pluginManager->isPluginActive('forum'), 'links' => $pluginManager->isPluginActive('links'));
     $config = OW::getConfig();
     if (OW::getRequest()->isPost() && !empty($_POST['action'])) {
         switch ($_POST['action']) {
             case 'update_metrics':
                 $conf = array();
                 foreach ($pluginsActivated as $key => $m) {
                     $conf[$key] = $pluginsActivated[$key] && !empty($_POST['metrics'][$key]) && $_POST['metrics'][$key];
                 }
                 $config->saveConfig('ocssitestats', 'metrics', json_encode($conf));
                 OW::getFeedback()->info($lang->text('ocssitestats', 'settings_updated'));
                 $this->redirect();
                 break;
             case 'update_settings':
                 $config->saveConfig('ocssitestats', 'zero_values', !empty($_POST['zero_values']));
                 OW::getFeedback()->info($lang->text('ocssitestats', 'settings_updated'));
                 $this->redirect();
                 break;
         }
     }
     $metricsConf = json_decode($config->getValue('ocssitestats', 'metrics'), true);
     $this->assign('metrics', $metricsConf);
     $zeroValues = $config->getValue('ocssitestats', 'zero_values');
     $this->assign('zeroValues', $zeroValues);
     $this->assign('pluginsActivated', $pluginsActivated);
     $logo = OW::getPluginManager()->getPlugin('ocssitestats')->getStaticUrl() . 'img/oxwallcandystore-logo.jpg';
     $this->assign('logo', $logo);
 }
开发者ID:vazahat,项目名称:dudex,代码行数:37,代码来源:admin.php

示例14: __construct

 public function __construct($params = array())
 {
     parent::__construct();
     $plugin = OW::getPluginManager()->getPlugin('base');
     $document = OW::getDocument();
     $document->addStyleSheet($plugin->getStaticCssUrl() . 'file_upload.css');
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:7,代码来源:ajax_file_upload_button.php

示例15: __construct

 public function __construct(BASE_CLASS_WidgetParameter $paramObject)
 {
     parent::__construct();
     $text = OW::getLanguage()->text('base', 'welcome_widget_content');
     $text = str_replace('</li>', "</li>\n", $text);
     //if the tags are written in a line it is necessary to make a compulsory hyphenation?
     $photoKey = str_replace('{$key}', self::KEY_PHOTO_UPLOAD, self::PATTERN);
     $avatarKey = str_replace('{$key}', self::KEY_CHANGE_AVATAR, self::PATTERN);
     if (OW::getPluginManager()->isPluginActive('photo') && mb_stripos($text, self::KEY_PHOTO_UPLOAD) !== false) {
         $label = OW::getLanguage()->text('photo', 'upload_photos');
         $js = OW::getEventManager()->call('photo.getAddPhotoURL');
         $langLabel = $this->getLangLabel($photoKey, $text, self::KEY_PHOTO_UPLOAD);
         if ($langLabel != NULL) {
             $label = $langLabel;
         }
         $text = preg_replace($photoKey, '<li><a href="javascript://" onclick="' . $js . '();">' . $label . '</a></li>', $text);
     } else {
         $text = preg_replace($photoKey, '', $text);
     }
     if (mb_stripos($text, self::KEY_CHANGE_AVATAR) !== false) {
         $label = OW::getLanguage()->text('base', 'avatar_change');
         $js = ' $("#welcomeWinget_loadAvatarChangeCmp").click(function(){' . 'document.avatarFloatBox = OW.ajaxFloatBox("BASE_CMP_AvatarChange", [], {width: 749, title: ' . json_encode($label) . '});' . '});';
         OW::getDocument()->addOnloadScript($js);
         $langLabel = $this->getLangLabel($avatarKey, $text, self::KEY_CHANGE_AVATAR);
         if ($langLabel != NULL) {
             $label = $langLabel;
         }
         $text = preg_replace($avatarKey, '<li><a id="welcomeWinget_loadAvatarChangeCmp" href="javascript://">' . $label . '</a></li>', $text);
     } else {
         $text = preg_replace($avatarKey, '', $text);
     }
     $this->assign('text', $text);
 }
开发者ID:hardikamutech,项目名称:loov,代码行数:33,代码来源:welcome_widget.php


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