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


PHP ZurmoDefaultViewUtil::makeStandardViewForCurrentUser方法代码示例

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


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

示例1: actionLeaderboard

 public function actionLeaderboard($type = null)
 {
     if ($type == null) {
         $type = GamePointUtil::LEADERBOARD_TYPE_WEEKLY;
     }
     if ($type == GamePointUtil::LEADERBOARD_TYPE_WEEKLY) {
         $activeActionElementType = 'LeaderboardWeeklyMenu';
     } elseif ($type == GamePointUtil::LEADERBOARD_TYPE_MONTHLY) {
         $activeActionElementType = 'LeaderboardMonthlyMenu';
     } elseif ($type == GamePointUtil::LEADERBOARD_TYPE_OVERALL) {
         $activeActionElementType = 'LeaderboardOverallMenu';
     } else {
         throw new NotSupportedException();
     }
     $metadata = array();
     //can put the typing information here easily. from the type.
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('listPageSize', get_class($this->getModule()));
     $gameLevel = new GameLevel(false);
     $dataProvider = RedBeanModelDataProviderUtil::makeDataProvider($metadata, get_class($gameLevel), 'LeaderboardDataProvider', 'notUsed', true, $pageSize);
     $dataProvider->setType($type);
     if (isset($_GET['ajax']) && $_GET['ajax'] == 'list-view') {
         $listView = new LeaderboardListView($this->getId(), $this->getModule()->getId(), get_class($gameLevel), $dataProvider, array());
         $view = new AccountsPageView($listView);
     } else {
         $mixedView = new LeaderboardActionBarAndListView($this->getId(), $this->getModule()->getId(), $gameLevel, 'GamificationModule', $dataProvider, $activeActionElementType);
         $view = new AccountsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $mixedView));
     }
     echo $view->render();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:29,代码来源:DefaultController.php

示例2: actionMassDelete

 public function actionMassDelete()
 {
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('massDeleteProgressPageSize');
     $deptReference = new DepartmentReference(false);
     $activeAttributes = $this->resolveActiveAttributesFromMassDeletePost();
     $dataProvider = $this->getDataProviderByResolvingSelectAllFromGet(new DepartmentReferencesSearchForm($deptReference), $pageSize, Yii::app()->user->userModel->id, null, 'DepartmentReferencesSearchView');
     $selectedRecordCount = $this->getSelectedRecordCountByResolvingSelectAllFromGet($dataProvider);
     $deptReference = $this->processMassDelete($pageSize, $activeAttributes, $selectedRecordCount, 'DepartmentReferencesPageView', $deptReference, DepartmentReferencesModule::getModuleLabelByTypeAndLanguage('Plural'), $dataProvider);
     $massDeleteView = $this->makeMassDeleteView($deptReference, $activeAttributes, $selectedRecordCount, DepartmentReferencesModule::getModuleLabelByTypeAndLanguage('Plural'));
     $view = new DepartmentReferencesPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $massDeleteView));
     echo $view->render();
 }
开发者ID:RamaKavanan,项目名称:BaseVersion,代码行数:12,代码来源:DefaultController.php

示例3: actionDetails

 public function actionDetails($id)
 {
     $savedReport = static::getModelAndCatchNotFoundAndDisplayError('SavedReport', intval($id));
     ControllerSecurityUtil::resolveCanCurrentUserAccessModule($savedReport->moduleClassName);
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($savedReport);
     AuditEvent::logAuditEvent('ZurmoModule', ZurmoModule::AUDIT_EVENT_ITEM_VIEWED, array(strval($savedReport), 'ReportsModule'), $savedReport);
     $breadCrumbLinks = array(strval($savedReport));
     $breadCrumbView = new ReportBreadCrumbView($this->getId(), $this->getModule()->getId(), $breadCrumbLinks);
     $detailsAndRelationsView = $this->makeReportDetailsAndRelationsView($savedReport, Yii::app()->request->getRequestUri(), $breadCrumbView);
     $view = new ReportsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $detailsAndRelationsView));
     echo $view->render();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:12,代码来源:DefaultController.php

示例4: preFilter

 protected function preFilter($filterChain)
 {
     if (isset($_POST['ajax'])) {
         return true;
     }
     if (Yii::app()->emailHelper->outboundHost != null) {
         return true;
     }
     $messageView = new NoGlobalEmailConfigurationYetView();
     $pageViewClassName = $this->controller->getModule()->getPluralCamelCasedName() . 'PageView';
     $view = new $pageViewClassName(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this->controller, $messageView));
     echo $view->render();
     return false;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:14,代码来源:EmailConfigurationCheckControllerFilter.php

示例5: preFilter

 protected function preFilter($filterChain)
 {
     if (isset($_POST['ajax'])) {
         return true;
     }
     $isLdapExtensionLoaded = InstallUtil::isLdapInstalled();
     if ($isLdapExtensionLoaded) {
         return true;
     }
     $messageView = new NoLdapExtensionLoadedView();
     $pageViewClassName = $this->controller->getModule()->getPluralCamelCasedName() . 'PageView';
     $view = new $pageViewClassName(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this->controller, $messageView));
     echo $view->render();
     return false;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:15,代码来源:LdapExtensionCheckControllerFilter.php

示例6: actionLeaderboard

 public function actionLeaderboard($type = null)
 {
     if ($type == null) {
         $type = GamePointUtil::LEADERBOARD_TYPE_WEEKLY;
     }
     if ($type == GamePointUtil::LEADERBOARD_TYPE_WEEKLY) {
         $activeActionElementType = 'LeaderboardWeeklyLink';
     } elseif ($type == GamePointUtil::LEADERBOARD_TYPE_MONTHLY) {
         $activeActionElementType = 'LeaderboardMonthlyLink';
     } elseif ($type == GamePointUtil::LEADERBOARD_TYPE_OVERALL) {
         $activeActionElementType = 'LeaderboardOverallLink';
     } else {
         throw new NotSupportedException();
     }
     $view = new TitleBarAndLeaderboardView($this->getId(), $this->getModule()->getId(), GamePointUtil::getUserLeaderboardData($type), $activeActionElementType);
     $view = new LeaderboardPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $view));
     echo $view->render();
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:18,代码来源:DefaultController.php

示例7: preFilter

 /**
  * Check if user set their primary email address.
  * @param CFilterChain $filterChain
  * @return bool
  * @throws NotFoundException
  * @throws NotSupportedException
  */
 protected function preFilter($filterChain)
 {
     if ($this->userId != null) {
         $user = User::getById($this->userId);
     } else {
         throw new NotSupportedException();
     }
     if (isset($_POST['ajax'])) {
         return true;
     }
     if ($user->primaryEmail->emailAddress != null) {
         return true;
     }
     $messageView = new NoPrimaryEmailAddressForLoggedUserYetView($this->userId);
     $pageViewClassName = $this->controller->getModule()->getPluralCamelCasedName() . 'PageView';
     $view = new $pageViewClassName(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this->controller, $messageView));
     echo $view->render();
     return false;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:26,代码来源:UserHasPrimaryEmailAddressControllerFilter.php

示例8: preFilter

 protected function preFilter($filterChain)
 {
     if (isset($_POST['ajax'])) {
         return true;
     }
     //Added some logic for watching there is last unmatched mail deleted
     $pageSize = null;
     $emailMessage = new EmailMessage(false);
     $searchAttributes = array();
     $metadataAdapter = new ArchivedEmailMatchingSearchDataProviderMetadataAdapter($emailMessage, Yii::app()->user->userModel->id, $searchAttributes);
     $dataProvider = RedBeanModelDataProviderUtil::makeDataProvider($metadataAdapter->getAdaptedMetadata(), 'EmailMessage', 'RedBeanModelDataProvider', 'createdDateTime', true, $pageSize);
     $data = $dataProvider->getData();
     if (count($data) > 0) {
         return true;
     }
     $messageView = new ZeroEmailMessagesRequiringArchivingView();
     $pageViewClassName = $this->controller->getModule()->getPluralCamelCasedName() . 'PageView';
     $view = new $pageViewClassName(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this->controller, $messageView));
     echo $view->render();
     return false;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:21,代码来源:EmailMessagesRequiringArchivingCheckControllerFilter.php

示例9: preFilter

 protected function preFilter($filterChain)
 {
     $getData = GetUtil::getData();
     $modelClassName = ArrayUtil::getArrayValue($getData, 'modelClassName');
     if ($modelClassName == null) {
         return true;
     }
     if ($modelClassName::getCount() != 0) {
         return true;
     }
     $moduleClassName = $modelClassName::getModuleClassName();
     $mashableRules = MashableUtil::createMashableInboxRulesByModel($modelClassName);
     if ($mashableRules->getZeroModelViewClassName() == null) {
         return true;
     }
     $messageViewClassName = $mashableRules->getZeroModelViewClassName();
     $messageView = new $messageViewClassName($this->controller->getId(), $moduleClassName::getDirectoryName(), $modelClassName);
     $pageViewClassName = $this->controller->getModule()->getPluralCamelCasedName() . 'PageView';
     $view = new $pageViewClassName(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this->controller, $messageView));
     echo $view->render();
     return false;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:22,代码来源:MashableInboxZeroModelsCheckControllerFilter.php

示例10: actionSequentialProcess

 /**
  * Example of a sequential process.
  * @see TestCompleteSequentialProcessView
  * @see TestSequentialProcess
  * @param string $step
  */
 function actionSequentialProcess($step)
 {
     if (isset($_GET['nextParams'])) {
         $nextParams = $_GET['nextParams'];
     } else {
         $nextParams = null;
     }
     Yii::import('application.core.tests.unit.models.*');
     Yii::import('application.core.tests.unit.components.*');
     Yii::import('application.core.tests.unit.views.*');
     assert('$step == null || is_string($step)');
     assert('$nextParams == null || is_array($nextParams)');
     //////Do setup logic here if needed
     $a = new A();
     $b = new B();
     $sequentialProcess = new TestSequentialProcess($a, $b);
     $sequentialProcess->run($step, $nextParams);
     $nextStep = $sequentialProcess->getNextStep();
     $route = $this->getModule()->getId() . '/' . $this->getId() . '/sequentialProcess';
     if ($sequentialProcess->isComplete()) {
         //////Do completion logic here if needed
         $sequenceView = new TestCompleteSequentialProcessView($a, $b);
     } else {
         $sequenceView = SequentialProcessViewFactory::makeBySequentialProcess($sequentialProcess, $route);
     }
     if ($step == null) {
         $gridView = new GridView(2, 1);
         $titleBarView = new TitleBarView('Zurmo', 'Test Sequential Process');
         $wrapperView = new SequentialProcessContainerView($sequenceView, $sequentialProcess->getAllStepsMessage());
         $gridView->setView($titleBarView, 0, 0);
         $gridView->setView($wrapperView, 1, 0);
         $view = new ZurmoConfigurationPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $gridView));
     } else {
         $view = new AjaxPageView($sequenceView);
     }
     echo $view->render();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:43,代码来源:TestController.php

示例11: actionAssemblyStep3

 public function actionAssemblyStep3($id)
 {
     if (empty($_SERVER['HTTP_REFERER'])) {
         $this->redirect(array('/costbook/default/Assembly'));
     }
     $Costbook = static::getModelAndCatchNotFoundAndDisplayError("Costbook", intval($id));
     $editAndDetailsView = new CostbookAssemblyStep3View('Edit', $this->getId(), $this->getModule()->getId(), $this->attemptToSaveModelFromPost($Costbook));
     $view = new CostbookPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $editAndDetailsView));
     echo $view->render();
 }
开发者ID:RamaKavanan,项目名称:BaseVersion,代码行数:10,代码来源:DefaultController.php

示例12: resolveZurmoDefaultOrAdminView

 /**
  * Depending on the user interface, the user views should utilize the admin or regular view.  This especially
  * important for mobile, since for mobile there are no admin views available yet.
  * @param $containedView
  * @param $breadCrumbLinks
  * @param $breadcrumbViewClassName
  * @return GridView
  */
 protected function resolveZurmoDefaultOrAdminView(View $containedView, $breadCrumbLinks, $breadcrumbViewClassName)
 {
     assert('is_array($breadCrumbLinks)');
     assert('is_string($breadcrumbViewClassName)');
     if (Yii::app()->userInterface->isMobile()) {
         return ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $containedView);
     } else {
         return ZurmoDefaultAdminViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $containedView, $breadCrumbLinks, $breadcrumbViewClassName);
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:18,代码来源:DefaultController.php

示例13: actionEditDashboard

 /**
  * Only supports saving 4 layoutTypes (max 2 column)
  *
  */
 public function actionEditDashboard($id)
 {
     $id = intval($id);
     $dashboard = Dashboard::getById(intval($id));
     ControllerSecurityUtil::resolveAccessCanCurrentUserWriteModel($dashboard);
     if (isset($_POST['Dashboard'])) {
         $oldLayoutType = $dashboard->layoutType;
         $dashboard->setAttributes($_POST['Dashboard']);
         assert('in_array($dashboard->layoutType, array_keys(Dashboard::getLayoutTypesData()))');
         if ($dashboard->save()) {
             if ($oldLayoutType != $dashboard->layoutType && $dashboard->layoutType == '100') {
                 $uniqueLayoutId = 'HomeDashboard' . $dashboard->layoutId;
                 $portletCollection = Portlet::getByLayoutIdAndUserSortedByColumnIdAndPosition($uniqueLayoutId, Yii::app()->user->userModel->id, array());
                 Portlet::shiftPositionsBasedOnColumnReduction($portletCollection, 1);
             }
             GeneralCache::forgetAll();
             //Ensure menu refreshes
             $this->redirect(array('default/dashboardDetails', 'id' => $dashboard->id));
         }
     }
     $editView = new DashboardEditView($this->getId(), $this->getModule()->getId(), $dashboard, strval($dashboard));
     $view = new AccountsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $editView));
     echo $view->render();
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:28,代码来源:DefaultController.php

示例14: actionConvert

 public function actionConvert($id)
 {
     assert('!empty($id)');
     $contact = Contact::getById(intval($id));
     if (!LeadsUtil::isStateALead($contact->state)) {
         $urlParams = array('/contacts/' . $this->getId() . '/details', 'id' => $contact->id);
         $this->redirect($urlParams);
     }
     $convertToAccountSetting = LeadsModule::getConvertToAccountSetting();
     $selectAccountForm = new AccountSelectForm();
     $account = new Account();
     ControllerSecurityUtil::resolveAccessCanCurrentUserWriteModel($contact);
     $userCanAccessContacts = RightsUtil::canUserAccessModule('ContactsModule', Yii::app()->user->userModel);
     $userCanAccessAccounts = RightsUtil::canUserAccessModule('AccountsModule', Yii::app()->user->userModel);
     $userCanCreateAccount = RightsUtil::doesUserHaveAllowByRightName('AccountsModule', AccountsModule::RIGHT_CREATE_ACCOUNTS, Yii::app()->user->userModel);
     LeadsControllerSecurityUtil::resolveCanUserProperlyConvertLead($userCanAccessContacts, $userCanAccessAccounts, $convertToAccountSetting);
     if (isset($_POST['AccountSelectForm'])) {
         $selectAccountForm->setAttributes($_POST['AccountSelectForm']);
         if ($selectAccountForm->validate()) {
             $account = Account::getById(intval($selectAccountForm->accountId));
             $this->actionSaveConvertedContact($contact, $account);
         }
     } elseif (isset($_POST['Account'])) {
         $account = LeadsUtil::attributesToAccountWithNoPostData($contact, $account, $_POST['Account']);
         $account->setAttributes($_POST['Account']);
         if ($account->save()) {
             $explicitReadWriteModelPermissions = ExplicitReadWriteModelPermissionsUtil::makeBySecurableItem($contact);
             ExplicitReadWriteModelPermissionsUtil::resolveExplicitReadWriteModelPermissions($account, $explicitReadWriteModelPermissions);
             if (!$account->save()) {
                 throw new NotSupportedException();
             }
             $this->actionSaveConvertedContact($contact, $account);
         }
     } elseif (isset($_POST['AccountSkip']) || $convertToAccountSetting == LeadsModule::CONVERT_NO_ACCOUNT || $convertToAccountSetting == LeadsModule::CONVERT_ACCOUNT_NOT_REQUIRED && !$userCanAccessAccounts) {
         $this->actionSaveConvertedContact($contact);
     } else {
         $account = LeadsUtil::attributesToAccount($contact, $account);
     }
     $convertView = new LeadConvertView($this->getId(), $this->getModule()->getId(), $contact->id, strval($contact), $selectAccountForm, $account, $convertToAccountSetting, $userCanCreateAccount);
     $view = new LeadsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $convertView));
     echo $view->render();
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:42,代码来源:DefaultController.php

示例15: actionMatchingList

 public function actionMatchingList()
 {
     $userCanAccessContacts = RightsUtil::canUserAccessModule('ContactsModule', Yii::app()->user->userModel);
     $userCanAccessLeads = RightsUtil::canUserAccessModule('LeadsModule', Yii::app()->user->userModel);
     EmailMessagesControllerSecurityUtil::resolveCanUserProperlyMatchMessage($userCanAccessContacts, $userCanAccessLeads);
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('listPageSize', get_class($this->getModule()));
     $emailMessage = new EmailMessage(false);
     $searchAttributes = array();
     $metadataAdapter = new ArchivedEmailMatchingSearchDataProviderMetadataAdapter($emailMessage, Yii::app()->user->userModel->id, $searchAttributes);
     $dataProvider = RedBeanModelDataProviderUtil::makeDataProvider($metadataAdapter->getAdaptedMetadata(), 'EmailMessage', 'RedBeanModelDataProvider', 'createdDateTime', true, $pageSize);
     $titleBarAndListView = new TitleBarAndListView($this->getId(), $this->getModule()->getId(), $emailMessage, 'EmailMessage', $dataProvider, 'ArchivedEmailMatchingListView', Zurmo::t('EmailMessagesModule', 'Unmatched Archived Emails'), array(), false);
     $view = new EmailMessagesPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $titleBarAndListView));
     echo $view->render();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:14,代码来源:DefaultController.php


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