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


PHP ZurmoDefaultViewUtil类代码示例

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


在下文中一共展示了ZurmoDefaultViewUtil类的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: actionEdit

 public function actionEdit($id, $redirectUrl = null)
 {
     $mission = Mission::getById(intval($id));
     MissionAccessUtil::resolveCanCurrentUserWriteOrDeleteMission($mission);
     ControllerSecurityUtil::resolveAccessCanCurrentUserWriteModel($mission);
     $editView = new MissionEditView($this->getId(), $this->getModule()->getId(), $this->attemptToSaveModelFromPost($mission), strval($mission));
     $missionsMashableInboxUrl = Yii::app()->createUrl('mashableInbox/default/list', array('modelClassName' => 'Mission'));
     $breadCrumbLinks = array(Zurmo::t('MissionsModule', 'Missions') => $missionsMashableInboxUrl, StringUtil::getChoppedStringContent(strval($mission), 25) => array('default/details', 'id' => $id), Zurmo::t('Core', 'Edit'));
     $view = new MissionsPageView(ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $editView, $breadCrumbLinks, 'MissionBreadCrumbView'));
     echo $view->render();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:11,代码来源:DefaultController.php

示例3: 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

示例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: actionList

 public function actionList()
 {
     $pageSize = new resolveActiveForCurrentUserByType('listPageSize', get_class($this->getModule()));
     $savedReport = new SavedReport(false);
     $searchForm = new ReportsSearchForm($savedReport);
     $listAttributesSelector = new ListAttributesSelector('ReportsListView', get_class($this->getModule()));
     $searchForm->setListAttributesSelector($listAttributesSelector);
     $dataProvider = $this->resolveSearchDataProvider($searchForm, $pageSize, null, 'ReportsSearchView');
     $title = Zurmo::t('ReportsModule', 'Reports');
     $breadCrumbLinks = array($title);
     if (isset($_GET['ajax']) && $_GET['ajax'] == 'list-view') {
         $mixedView = $this->makeListView($searchForm, $dataProvider);
         $view = new ReportsPageView($mixedView);
     } else {
         $mixedView = $this->makeActionBarSearchAndListView($searchForm, $dataProvider, 'SecuredActionBarForReportsSearchAndListView');
         $view = new ReportsPageView(ZurmoDefaultViewUtil::makeViewWithBreadcrumbsForCurrentUser($this, $mixedView, $breadCrumbLinks, 'ReportBreadCrumbView'));
     }
     echo $view->render();
 }
开发者ID:BGCX262,项目名称:zurmo-b-2013-svn-to-git,代码行数:19,代码来源:ReportController.php

示例9: 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

示例10: 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

示例11: actionMassDelete

 /**
  * Action for displaying a mass delete form and also action when that form is first submitted.
  * When the form is submitted, in the event that the quantity of models to delete is greater
  * than the pageSize, then once the pageSize quantity has been reached, the user will be
  * redirected to the makeMassDeleteProgressView.
  * In the mass delete progress view, a javascript refresh will take place that will call a refresh
  * action, usually makeMassDeleteProgressView.
  * If there is no need for a progress view, then a flash message will be added and the user will
  * be redirected to the list view for the model.  A flash message will appear providing information
  * on the delete records.
  * @see Controller->makeMassDeleteProgressView
  * @see Controller->processMassDelete
  * @see
  */
 public function actionMassDelete()
 {
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('massDeleteProgressPageSize');
     $queueItem = new WorkflowMessageInQueue(false);
     $activeAttributes = $this->resolveActiveAttributesFromMassDeletePost();
     $dataProvider = $this->getDataProviderByResolvingSelectAllFromGet(new WorkflowMessageInQueuesSearchForm($queueItem), $pageSize, Yii::app()->user->userModel->id, null, 'WorkflowMessageInQueuesSearchView');
     $selectedRecordCount = static::getSelectedRecordCountByResolvingSelectAllFromGet($dataProvider);
     $queueItem = $this->processMassDelete($pageSize, $activeAttributes, $selectedRecordCount, 'WorkflowsPageView', $queueItem, Zurmo::t('WorkflowsModule', 'Message Queue'), $dataProvider, array($this->getId() . '/list'));
     $massDeleteView = $this->makeMassDeleteView($queueItem, $activeAttributes, $selectedRecordCount, Zurmo::t('WorkflowsModule', 'Message Queue'), 'MassDeleteView', false);
     $view = new WorkflowsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $massDeleteView));
     echo $view->render();
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:26,代码来源:DefaultMessageQueueController.php

示例12: actionEdit

 public function actionEdit($id, $isBeingCopied = false)
 {
     $savedReport = SavedReport::getById((int) $id);
     ControllerSecurityUtil::resolveCanCurrentUserAccessModule($savedReport->moduleClassName);
     if (!$isBeingCopied) {
         ControllerSecurityUtil::resolveAccessCanCurrentUserWriteModel($savedReport);
     }
     $breadCrumbLinks = array(strval($savedReport));
     $report = SavedReportToReportAdapter::makeReportBySavedReport($savedReport);
     $progressBarAndStepsView = ReportWizardViewFactory::makeStepsAndProgressBarViewFromReport($report);
     $reportWizardView = ReportWizardViewFactory::makeViewFromReport($report, (bool) $isBeingCopied);
     $view = new ReportsPageView(ZurmoDefaultViewUtil::makeTwoViewsWithBreadcrumbsForCurrentUser($this, $progressBarAndStepsView, $reportWizardView, $breadCrumbLinks, 'ReportBreadCrumbView'));
     echo $view->render();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:14,代码来源:DefaultController.php

示例13: actionPushLayout

 public function actionPushLayout($id)
 {
     $modelClassName = $this->getModelName();
     $model = $modelClassName::getById(intval($id));
     if (isset($_POST[$modelClassName])) {
         $groupsAndUsers = PushDashboardUtil::resolveGroupsAndUsersFromPost($_POST[$modelClassName]);
         PushDashboardUtil::pushLayoutToUsers($model, $groupsAndUsers);
         Yii::app()->user->setFlash('notification', Zurmo::t('ZurmoModule', 'Layout pushed successfully'));
         $this->redirect(array($this->getId() . '/details', 'id' => $id));
     }
     $editView = new PushDashboardEditView($this->getId(), $this->getModule()->getId(), $model, Zurmo::t('ZurmoModule', 'Push Layout'));
     $view = new ZurmoPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $editView));
     echo $view->render();
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:14,代码来源:ZurmoModuleController.php

示例14: 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

示例15: actionCreateByModel

 protected function actionCreateByModel(Conversation $conversation, $redirectUrl)
 {
     $editView = new ConversationEditView($this->getId(), $this->getModule()->getId(), $this->attemptToSaveModelFromPost($conversation, $redirectUrl), Zurmo::t('ConversationsModule', 'Create Conversation'));
     $view = new ConversationsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $editView));
     echo $view->render();
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:6,代码来源:DefaultController.php


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