當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OW_Component::__construct方法代碼示例

本文整理匯總了PHP中OW_Component::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP OW_Component::__construct方法的具體用法?PHP OW_Component::__construct怎麽用?PHP OW_Component::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OW_Component的用法示例。


在下文中一共展示了OW_Component::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct($list, $offset, $count)
 {
     parent::__construct();
     $this->assign('list', $list);
     $this->assign('count', $count);
     $this->assign('loadMore', $count - $offset > BOL_AvatarService::AVATAR_CHANGE_GALLERY_LIMIT);
 }
開發者ID:hardikamutech,項目名稱:loov,代碼行數:7,代碼來源:avatar_library_section.php

示例2: __construct

 public function __construct($params = array())
 {
     parent::__construct();
     $service = BOL_BillingService::getInstance();
     $gateway = $service->findGatewayByKey($params['gateway']);
     if (!$gateway || $gateway->dynamic) {
         $this->setVisible(false);
         return;
     }
     $event = new BASE_CLASS_EventCollector('base.billing_add_gateway_product');
     OW::getEventManager()->trigger($event);
     $data = $event->getData();
     $eventProducts = array();
     if ($data) {
         foreach ($data as $plugin) {
             foreach ($plugin as $product) {
                 $id = $service->addGatewayProduct($gateway->id, $product['pluginKey'], $product['entityType'], $product['entityId']);
                 $product['id'] = $id;
                 $eventProducts[] = $product;
             }
         }
     }
     $products = $service->findGatewayProductList($gateway->id);
     foreach ($eventProducts as &$prod) {
         $prod['productId'] = !empty($products[$prod['id']]) ? $products[$prod['id']]['dto']->productId : null;
         $prod['plugin'] = !empty($products[$prod['id']]) ? $products[$prod['id']]['plugin'] : null;
     }
     $this->assign('products', $eventProducts);
     $this->assign('actionUrl', OW::getRouter()->urlFor('BASE_CTRL_Billing', 'saveGatewayProduct'));
     $this->assign('backUrl', urlencode(OW::getRouter()->getBaseUrl() . OW::getRouter()->getUri()));
 }
開發者ID:vazahat,項目名稱:dudex,代碼行數:31,代碼來源:billing_gateway_products.php

示例3: __construct

 public function __construct($layout, $params)
 {
     parent::__construct();
     if (empty($params['available'])) {
         if (!empty($params['msg'])) {
             $msg = $params['msg'];
         } else {
             $msg = OW::getLanguage()->text('base', 'authorization_failed_feedback');
         }
         $this->assign('authError', $msg);
         return;
     }
     switch ($layout) {
         case 'page':
             $class = ' ow_photoview_info_onpage';
             break;
         default:
             if ((bool) OW::getConfig()->getValue('photo', 'photo_view_classic')) {
                 $class = ' ow_photoview_pint_mode';
             } else {
                 $class = '';
             }
             break;
     }
     $this->assign('class', $class);
     $this->assign('layout', $layout);
 }
開發者ID:hardikamutech,項目名稱:loov,代碼行數:27,代碼來源:photo_floatbox.php

示例4: __construct

 /**
  * Constructor.
  *
  * @param BASE_CommentsParams $params
  */
 public function __construct(BASE_CommentsParams $params)
 {
     parent::__construct();
     $this->params = $params;
     $this->batchData = $params->getBatchData();
     $this->staticData = empty($this->batchData['_static']) ? array() : $this->batchData['_static'];
     $this->batchData = isset($this->batchData[$params->getEntityType()][$params->getEntityId()]) ? $this->batchData[$params->getEntityType()][$params->getEntityId()] : array();
     srand(time());
     $this->id = $params->getEntityType() . $params->getEntityId() . rand(1, 10000);
     $this->cmpContextId = "comments-{$this->id}";
     $this->assign('cmpContext', $this->cmpContextId);
     $this->assign('wrapInBox', $params->getWrapInBox());
     $this->assign('topList', in_array($params->getDisplayType(), array(BASE_CommentsParams::DISPLAY_TYPE_WITH_LOAD_LIST, BASE_CommentsParams::DISPLAY_TYPE_WITH_LOAD_LIST_MINI)));
     $this->assign('bottomList', $params->getDisplayType() == BASE_CommentsParams::DISPLAY_TYPE_WITH_PAGING);
     $this->assign('mini', $params->getDisplayType() == BASE_CommentsParams::DISPLAY_TYPE_WITH_LOAD_LIST_MINI);
     $this->isAuthorized = OW::getUser()->isAuthorized($params->getPluginKey(), 'add_comment') && $params->getAddComment();
     if (!$this->isAuthorized) {
         $errorMessage = $params->getErrorMessage();
         if (empty($errorMessage)) {
             $status = BOL_AuthorizationService::getInstance()->getActionStatus($params->getPluginKey(), 'add_comment');
             $errorMessage = OW::getUser()->isAuthenticated() ? $status['msg'] : OW::getLanguage()->text('base', 'comments_add_login_message');
         }
         $this->assign('authErrorMessage', $errorMessage);
     }
     $this->initForm();
 }
開發者ID:hardikamutech,項目名稱:loov,代碼行數:31,代碼來源:comments.php

示例5: __construct

 public function __construct($userId)
 {
     parent::__construct();
     $this->userId = $userId;
     $this->uniqId = uniqid("hint-");
     $this->cover = $this->getCover();
 }
開發者ID:vazahat,項目名稱:dudex,代碼行數:7,代碼來源:user_hint.php

示例6: __construct

 /**
  * Constructor.
  */
 public function __construct($ajax = false)
 {
     parent::__construct();
     $form = new Form('sign-in');
     $form->setAction("");
     $username = new TextField('identity');
     $username->setRequired(true);
     $username->setHasInvitation(true);
     $username->setInvitation(OW::getLanguage()->text('base', 'component_sign_in_login_invitation'));
     $form->addElement($username);
     $password = new PasswordField('password');
     $password->setHasInvitation(true);
     $password->setInvitation('password');
     $password->setRequired(true);
     $form->addElement($password);
     $remeberMe = new CheckboxField('remember');
     $remeberMe->setValue(true);
     $remeberMe->setLabel(OW::getLanguage()->text('base', 'sign_in_remember_me_label'));
     $form->addElement($remeberMe);
     $submit = new Submit('submit');
     $submit->setValue(OW::getLanguage()->text('base', 'sign_in_submit_label'));
     $form->addElement($submit);
     $this->addForm($form);
     if ($ajax) {
         $form->setAjaxResetOnSuccess(false);
         $form->setAjax();
         $form->setAction(OW::getRouter()->urlFor('BASE_CTRL_User', 'ajaxSignIn'));
         $form->bindJsFunction(Form::BIND_SUCCESS, 'function(data){if( data.result ){if(data.message){OW.info(data.message);}setTimeout(function(){window.location.reload();}, 1000);}else{OW.error(data.message);}}');
         $this->assign('forgot_url', OW::getRouter()->urlForRoute('base_forgot_password'));
     }
     $this->assign('joinUrl', OW::getRouter()->urlForRoute('base_join'));
 }
開發者ID:vazahat,項目名稱:dudex,代碼行數:35,代碼來源:sign_in.php

示例7: __construct

 public function __construct(array $aParams)
 {
     parent::__construct();
     //print_r($aParams); exit;
     foreach ($aParams['items'] as $k => $v) {
         $aParams['items'][$k]['media_parent'] = isset($aParams['items'][$k]['media_parent']) ? $aParams['items'][$k]['media_parent'] : '';
         $aParams['items'][$k]['title_decode'] = urldecode($aParams['items'][$k]['title']);
         $aParams['items'][$k]['update_page_param'] = http_build_query(array('service' => $aParams['items'][$k]['provider'], 'media' => 'photo', 'media_parent' => $aParams['items'][$k]['media_parent'], 'extra' => 'aid', 'aid' => $aParams['items'][$k]['aid']));
         //$aParams['items'][$k]['brief_title'] = substr($aParams['items'][$k]['title_decode'], 0, 20);
         $aParams['items'][$k]['status_text'] = OW::getLanguage()->text("ynmediaimporter", 'import_status_' . $aParams['items'][$k]['status']);
         $aParams['items'][$k]['json'] = json_encode($aParams['items'][$k]);
     }
     //print_r($aParams); exit;
     if (isset($aParams['items'])) {
         $this->assign('items', $aParams['items']);
     }
     if (isset($aParams['params'])) {
         $this->assign('params', $aParams['params']);
         $this->assign('params_json', json_encode($aParams['params']));
     }
     if (isset($aParams['item_count'])) {
         $this->assign('item_count', $aParams['item_count']);
     }
     if (isset($aParams['userId'])) {
         $this->assign('userId', $aParams['userId']);
     }
 }
開發者ID:vazahat,項目名稱:dudex,代碼行數:27,代碼來源:album_browse.php

示例8: __construct

 public function __construct($userId, $options)
 {
     parent::__construct();
     $this->userId = $userId;
     $this->uniqId = uniqid("uhg-");
     $this->options = $options;
 }
開發者ID:vazahat,項目名稱:dudex,代碼行數:7,代碼來源:gallery.php

示例9: __construct

 public function __construct($userId, $tabKey)
 {
     parent::__construct();
     $this->bridge = UHEADER_CLASS_PhotoBridge::getInstance();
     $this->userId = $userId;
     $this->tabKey = $tabKey;
 }
開發者ID:vazahat,項目名稱:dudex,代碼行數:7,代碼來源:my_photos.php

示例10: __construct

 public function __construct($userId)
 {
     parent::__construct();
     $data = OW::getEventManager()->call("photo.entity_albums_find", array("entityType" => "user", "entityId" => $userId));
     $albums = empty($data["albums"]) ? array() : $data["albums"];
     $source = BOL_PreferenceService::getInstance()->getPreferenceValue("pcgallery_source", $userId);
     $this->assign("source", $source == "album" ? "album" : "all");
     $selectedAlbum = BOL_PreferenceService::getInstance()->getPreferenceValue("pcgallery_album", $userId);
     $form = new Form("pcGallerySettings");
     $form->setEmptyElementsErrorMessage(null);
     $form->setAction(OW::getRouter()->urlFor("PCGALLERY_CTRL_Gallery", "saveSettings"));
     $element = new HiddenField("userId");
     $element->setValue($userId);
     $form->addElement($element);
     $element = new Selectbox("album");
     $element->setHasInvitation(true);
     $element->setInvitation(OW::getLanguage()->text("pcgallery", "settings_album_invitation"));
     $validator = new PCGALLERY_AlbumValidator();
     $element->addValidator($validator);
     $albumsPhotoCount = array();
     foreach ($albums as $album) {
         $element->addOption($album["id"], $album["name"] . " ({$album["photoCount"]})");
         $albumsPhotoCount[$album["id"]] = $album["photoCount"];
         if ($album["id"] == $selectedAlbum) {
             $element->setValue($album["id"]);
         }
     }
     OW::getDocument()->addOnloadScript(UTIL_JsGenerator::composeJsString('window.pcgallery_settingsAlbumCounts = {$albumsCount};', array("albumsCount" => $albumsPhotoCount)));
     $element->setLabel(OW::getLanguage()->text("pcgallery", "source_album_label"));
     $form->addElement($element);
     $submit = new Submit("save");
     $submit->setValue(OW::getLanguage()->text("pcgallery", "save_settings_btn_label"));
     $form->addElement($submit);
     $this->addForm($form);
 }
開發者ID:hardikamutech,項目名稱:loov,代碼行數:35,代碼來源:gallery_settings.php

示例11: array

 /**
  * User list
  * 
  * @param array $params
  *      integer count
  *      string boxType
  */
 function __construct(array $params = array())
 {
     parent::__construct();
     $this->countUsers = !empty($params['count']) ? (int) $params['count'] : self::DEFAULT_USERS_COUNT;
     $boxType = !empty($params['boxType']) ? $params['boxType'] : "";
     // init users short list
     $randId = UTIL_HtmlTag::generateAutoId('base_users_cmp');
     $data = $this->getData($this->countUsers);
     $menuItems = array();
     $dataToAssign = array();
     foreach ($data as $key => $item) {
         $contId = "{$randId}_users_cmp_{$key}";
         $toolbarId = !empty($item['toolbar']) ? "{$randId}_toolbar_{$key}" : false;
         $menuItems[$key] = array('label' => $item['menu-label'], 'id' => "{$randId}_users_cmp_menu_{$key}", 'contId' => $contId, 'active' => !empty($item['menu_active']), 'toolbarId' => $toolbarId, 'display' => 1);
         $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);
     }
     $menu = $this->getMenuCmp($menuItems);
     if (!empty($menu)) {
         $this->addComponent('menu', $menu);
     }
     // assign view variables
     $this->assign('widgetId', $randId);
     $this->assign('data', $dataToAssign);
     $this->assign('boxType', $boxType);
 }
開發者ID:ZyXelP,項目名稱:oxwall,代碼行數:33,代碼來源:user_list.php

示例12: __construct

 public function __construct($layout)
 {
     parent::__construct();
     $status = BOL_AuthorizationService::getInstance()->getActionStatus('photo', 'view');
     if ($status['status'] == BOL_AuthorizationService::STATUS_DISABLED) {
         $this->assign('authError', $status['msg']);
         return;
     }
     $class = "";
     switch ($layout) {
         case 'page':
             $class = ' ow_photoview_info_onpage';
             break;
         default:
             if ((bool) OW::getConfig()->getValue('photo', 'photo_view_classic')) {
                 $class = ' ow_photoview_pint_mode';
             } else {
                 $class = '';
             }
             break;
     }
     $this->assign('class ', $class);
     $this->assign('layout ', $layout);
     $document = OW::getDocument();
     $js = "\$('#btn-save-as-avatar').off().on('click', function() {\n        console.log('photo floatbox call js');\n        var photoId = \$('#btn-photo-edit') . attr('rel');\n\n        document.avatarFloatBox = OW.ajaxFloatBox(\n        'BASE_CMP_AvatarChange', {\n            params: {\n                step: 2, entityType: 'photo_album', entityId: '', id: photoId\n            }}, {\n                width: 749, title: OW.getLanguageText('base', 'avatar_change')}\n                );\n            })";
     $document->addOnloadScript($js);
 }
開發者ID:hardikamutech,項目名稱:hammu,代碼行數:27,代碼來源:photo_floatbox.php

示例13: __construct

 public function __construct($affiliateId)
 {
     parent::__construct();
     $service = OCSAFFILIATES_BOL_Service::getInstance();
     $affiliate = $service->findAffiliateById($affiliateId);
     if (!$affiliate) {
         $this->setVisible(false);
         return;
     }
     $billingService = BOL_BillingService::getInstance();
     $this->assign('currency', $billingService->getActiveCurrency());
     $clicksCount = $service->countClicksForAffiliate($affiliateId);
     $this->assign('clicksCount', $clicksCount);
     $signupCount = $service->countRegistrationsForAffiliate($affiliateId);
     $this->assign('signupCount', $signupCount);
     $salesCount = $service->countSalesForAffiliate($affiliateId);
     $this->assign('salesCount', $salesCount);
     $clicksSum = $service->getClicksSumForAffiliate($affiliateId);
     $this->assign('clicksSum', $clicksSum);
     $signupSum = $service->getRegistrationsSumForAffiliate($affiliateId);
     $this->assign('signupSum', $signupSum);
     $salesSum = $service->getSalesSumForAffiliate($affiliateId);
     $this->assign('salesSum', $salesSum);
     $earnings = $clicksSum + $signupSum + $salesSum;
     $this->assign('earnings', $earnings);
     $payouts = $service->getPayoutSum($affiliateId);
     $this->assign('payouts', $payouts);
     $balance = $earnings - $payouts;
     $this->assign('balance', $balance);
     $this->assign('affiliate', $affiliate);
 }
開發者ID:vazahat,項目名稱:dudex,代碼行數:31,代碼來源:affiliate_stats.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

    /**
     * Constructor.
     */
    public function __construct($params = array())
    {
        parent::__construct();
        $userId = (int) $params['userId'];
        $showMessage = (bool) $params['showMessage'];
        $rspUrl = OW::getRouter()->urlFor('BASE_CTRL_User', 'deleteUser', array('user-id' => $userId));
        $rspUrl = OW::getRequest()->buildUrlQueryString($rspUrl, array('showMessage' => (int) $showMessage));
        $js = UTIL_JsGenerator::composeJsString('$("#baseDCButton").click(function()
        {
            var button = this;

            OW.inProgressNode(button);

            $.getJSON({$rsp}, function(r)
            {
                OW.activateNode(button);

                if ( _scope.floatBox )
                {
                    _scope.floatBox.close();
                }

                if ( _scope.deleteCallback )
                {
                    _scope.deleteCallback(r);
                }
            });
        });', array('rsp' => $rspUrl));
        OW::getDocument()->addOnloadScript($js);
    }
開發者ID:vazahat,項目名稱:dudex,代碼行數:33,代碼來源:delete_user.php


注:本文中的OW_Component::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。