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


PHP GetUtil::getData方法代码示例

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


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

示例1: getListView

 /**
  * @param   string $moduleName
  * @param   bool $forceEmptyResults
  * Return an empty listView
  * @return  View
  */
 public function getListView($moduleName, $forceEmptyResults = false)
 {
     assert('is_string($moduleName)');
     $sourceData = GetUtil::getData();
     $pageSize = $this->pageSize;
     $module = Yii::app()->findModule($moduleName);
     $searchFormClassName = $module::getGlobalSearchFormClassName();
     $modelClassName = $module::getPrimaryModelName();
     $model = new $modelClassName(false);
     $searchForm = new $searchFormClassName($model);
     $sanitizedSearchAttributes = MixedTermSearchUtil::getGlobalSearchAttributeByModuleAndPartialTerm($module, $this->term);
     $metadataAdapter = new SearchDataProviderMetadataAdapter($searchForm, $this->user->id, $sanitizedSearchAttributes);
     $listViewClassName = $module::getPluralCamelCasedName() . 'ForMixedModelsSearchListView';
     $sortAttribute = SearchUtil::resolveSortAttributeFromArray($modelClassName, $sourceData);
     $sortDescending = SearchUtil::resolveSortDescendingFromArray($modelClassName, $sourceData);
     if ($forceEmptyResults) {
         $dataProviderClass = 'EmptyRedBeanModelDataProvider';
         $emptyText = '';
     } else {
         $dataProviderClass = 'RedBeanModelDataProvider';
         $emptyText = null;
     }
     $dataProvider = RedBeanModelDataProviderUtil::makeDataProvider($metadataAdapter->getAdaptedMetadata(false), $modelClassName, $dataProviderClass, $sortAttribute, $sortDescending, $pageSize, $module->getStateMetadataAdapterClassName());
     $listView = new $listViewClassName('default', $module->getId(), $modelClassName, $dataProvider, GetUtil::resolveSelectedIdsFromGet(), '-' . $moduleName, array('route' => '', 'class' => 'SimpleListLinkPager', 'firstPageLabel' => '<span>first</span>', 'prevPageLabel' => '<span>previous</span>', 'nextPageLabel' => '<span>next</span>', 'lastPageLabel' => '<span>last</span>'));
     $listView->setRowsAreSelectable(false);
     $listView->setEmptyText($emptyText);
     return $listView;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:34,代码来源:MixedModelsSearchResultsDataCollection.php

示例2: actionDetails

 public function actionDetails($id)
 {
     $contact = static::getModelAndCatchNotFoundAndDisplayError('Contact', intval($id));
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($contact);
     if (!LeadsUtil::isStateALead($contact->state)) {
         $urlParams = array('/contacts/' . $this->getId() . '/details', 'id' => $contact->id);
         $this->redirect($urlParams);
     } else {
         AuditEvent::logAuditEvent('ZurmoModule', ZurmoModule::AUDIT_EVENT_ITEM_VIEWED, array(strval($contact), 'LeadsModule'), $contact);
         $getData = GetUtil::getData();
         $isKanbanBoardInRequest = ArrayUtil::getArrayValue($getData, 'kanbanBoard');
         if ($isKanbanBoardInRequest == 0 || $isKanbanBoardInRequest == null || Yii::app()->userInterface->isMobile() === true) {
             $breadCrumbView = StickySearchUtil::resolveBreadCrumbViewForDetailsControllerAction($this, 'LeadsSearchView', $contact);
             $detailsAndRelationsView = $this->makeDetailsAndRelationsView($contact, 'LeadsModule', 'LeadDetailsAndRelationsView', Yii::app()->request->getRequestUri(), $breadCrumbView);
             $view = new LeadsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $detailsAndRelationsView));
         } else {
             $kanbanItem = new KanbanItem();
             $kanbanBoard = new TaskKanbanBoard($kanbanItem, 'type', $contact, get_class($contact));
             $kanbanBoard->setIsActive();
             $params['relationModel'] = $contact;
             $params['relationModuleId'] = $this->getModule()->getId();
             $params['redirectUrl'] = null;
             $listView = new TasksForLeadKanbanView($this->getId(), 'tasks', 'Task', null, $params, null, array(), $kanbanBoard);
             $view = new LeadsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $listView));
         }
         echo $view->render();
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:28,代码来源:DefaultController.php

示例3: isKanbanRequest

 /**
  * Check if the request is to display kanban view
  * @return boolean
  */
 public static function isKanbanRequest()
 {
     $getData = GetUtil::getData();
     $isKanbanBoardInRequest = ArrayUtil::getArrayValue($getData, 'kanbanBoard');
     if ($isKanbanBoardInRequest == 0 || $isKanbanBoardInRequest == null || Yii::app()->userInterface->isMobile() === true) {
         return false;
     }
     return true;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:13,代码来源:KanbanUtil.php

示例4: getDefaultRoute

 /**
  * @return string
  */
 protected function getDefaultRoute()
 {
     $getData = GetUtil::getData();
     if (isset($getData['id']) && $getData['id'] != '') {
         return Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/details/', array('id' => $getData['id']));
     } else {
         return Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId);
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:12,代码来源:UserEmailConfigurationCancelLinkActionElement.php

示例5: getCGridViewPagerParams

 /**
  * Override so the pagination link works properly.
  * (non-PHPdoc)
  * @see ListView::getCGridViewPagerParams()
  */
 protected function getCGridViewPagerParams()
 {
     $defaultGridViewPagerParams = array('prevPageLabel' => '<span>previous</span>', 'nextPageLabel' => '<span>next</span>', 'class' => 'EndlessListLinkPager', 'paginationParams' => GetUtil::getData(), 'route' => $this->getGridViewActionRoute('matchingList', $this->moduleId));
     if (empty($this->gridViewPagerParams)) {
         return $defaultGridViewPagerParams;
     } else {
         return array_merge($defaultGridViewPagerParams, $this->gridViewPagerParams);
     }
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:14,代码来源:ArchivedEmailMatchingListView.php

示例6: resolveBreadCrumbViewForDetailsControllerAction

 /**
  * @param CController $controller
  * @param $stickySearchKey
  * @param RedBeanModel $model
  * @return mixed
  */
 public static function resolveBreadCrumbViewForDetailsControllerAction(CController $controller, $stickySearchKey, RedBeanModel $model)
 {
     assert('is_string($stickySearchKey)');
     if (ArrayUtil::getArrayValue(GetUtil::getData(), 'stickyOffset') !== null && StickySearchUtil::getDataByKey($stickySearchKey) != null) {
         $stickyLoadUrl = Yii::app()->createUrl($controller->getModule()->getId() . '/' . $controller->getId() . '/renderStickyListBreadCrumbContent', array('stickyKey' => $stickySearchKey, 'stickyOffset' => ArrayUtil::getArrayValue(GetUtil::getData(), 'stickyOffset'), 'stickyModelId' => $model->id));
     } else {
         $stickyLoadUrl = null;
     }
     $className = static::resolveStickyDetailsAndRelationsBreadCrumbViewClassName();
     return new $className($controller->getId(), $controller->getModule()->getId(), static::resolveBreadcrumbLinks($model), $controller->getModule()->getModuleLabelByTypeAndLanguage('Plural'), $stickyLoadUrl);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:17,代码来源:StickySearchUtil.php

示例7: getZurmoControllerUtil

 protected static function getZurmoControllerUtil()
 {
     $getData = GetUtil::getData();
     $relatedUserId = ArrayUtil::getArrayValue($getData, 'relatedUserId');
     if ($relatedUserId == null) {
         $relatedUser = null;
     } else {
         $relatedUser = User::getById((int) $relatedUserId);
     }
     return new SocialItemZurmoControllerUtil($relatedUser);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:11,代码来源:DefaultController.php

示例8: getDefaultRoute

 protected function getDefaultRoute()
 {
     if (Yii::app()->controller->action->id == 'copy') {
         $getData = GetUtil::getData();
         return Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/details/', array('id' => $getData['id']));
     } elseif (Yii::app()->request->getParam('redirectUrl') != null) {
         return Yii::app()->request->getParam('redirectUrl');
     } elseif (!empty($this->modelId) && $this->modelId > 0) {
         return Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/details/', array('id' => $this->modelId));
     } else {
         return Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId);
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:13,代码来源:CancelLinkActionElement.php

示例9: getDataProvider

 protected function getDataProvider(Report $report, $stickyKey, $runReport)
 {
     assert('is_string($stickyKey) || is_int($stickyKey)');
     assert('is_bool($runReport)');
     $getData = GetUtil::getData();
     if (isset($getData['clearRuntimeFilters']) && $getData['clearRuntimeFilters']) {
         StickyReportUtil::clearDataByKey($stickyKey);
     }
     if (null != ($stickyData = StickyReportUtil::getDataByKey($stickyKey))) {
         StickyReportUtil::resolveStickyDataToReport($report, $stickyData);
     }
     $pageSize = Yii::app()->pagination->resolveActiveForCurrentUserByType('reportResultsListPageSize', get_class($this->getModule()));
     $dataProvider = ReportDataProviderFactory::makeByReport($report, $pageSize);
     if ($runReport) {
         $dataProvider->setRunReport($runReport);
     }
     return $dataProvider;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:18,代码来源:DefaultPortletController.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: makeWhere

 /**
  * Add where clause for searching for related models
  * @param $modelClassName
  * @param array $metadata
  * @param $joinTablesAdapter
  * @return string
  * @throws NotSupportedException
  */
 public static function makeWhere($modelClassName, array $metadata, &$joinTablesAdapter)
 {
     $data = GetUtil::getData();
     if (!isset($data['relationAttributeName']) || !$modelClassName::isRelation($data['relationAttributeName']) || intval($data['id']) <= 0) {
         throw new NotSupportedException();
     }
     $relationAttributeName = $data['relationAttributeName'];
     $additionalMetaData = static::getAdditionalSearchMetadata($relationAttributeName, $data);
     $clausesCount = 0;
     if (isset($metadata['clauses'])) {
         $clausesCount = count($metadata['clauses']);
         $metadata['clauses'][count($metadata['clauses']) + 1] = $additionalMetaData;
     } else {
         $metadata['clauses'][1] = $additionalMetaData;
     }
     if ($clausesCount == 0) {
         $metadata['structure'] = '(1)';
     } else {
         $count = $clausesCount + 1;
         $metadata['structure'] = $metadata['structure'] . ' and (' . $count . ')';
     }
     return ModelDataProviderUtil::makeWhere($modelClassName, $metadata, $joinTablesAdapter);
 }
开发者ID:KulturedKitsch,项目名称:kulturedkitsch.info,代码行数:31,代码来源:RedBeanModelByRelatedModelDataProvider.php

示例12: resolvePaginationParams

 /**
  * Resolves pagination params
  * @return array
  */
 protected function resolvePaginationParams()
 {
     return array_merge(GetUtil::getData(), array('portletId' => $this->params['portletId'], 'redirectUrl' => $this->params['redirectUrl']));
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:8,代码来源:RelatedListView.php

示例13: resolveRouteParameters

 protected function resolveRouteParameters()
 {
     return array_merge(GetUtil::getData(), array('id' => $this->modelId, 'action' => 'copy'));
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:4,代码来源:TaskModalCloneFromModalDetailsLinkActionElement.php

示例14: renderConfigSaveAjax

 protected function renderConfigSaveAjax($formName, $moduleId, $controllerId, $actionSave)
 {
     return ZurmoHtml::ajax(array('type' => 'POST', 'data' => 'js:$("#' . $formName . '").serialize()', 'url' => Yii::app()->createUrl($moduleId . '/' . $controllerId . '/' . $actionSave, GetUtil::getData()), 'update' => '#modalContainer'));
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:4,代码来源:ContactRequiresPrimaryEmailFirstModalView.php

示例15: getCGridViewPagerParams

 protected function getCGridViewPagerParams()
 {
     return array('firstPageLabel' => '<span>first</span>', 'prevPageLabel' => '<span>previous</span>', 'nextPageLabel' => '<span>next</span>', 'lastPageLabel' => '<span>last</span>', 'class' => 'SimpleListLinkPager', 'paginationParams' => GetUtil::getData(), 'route' => 'default/daysMeetingsFromCalendarModalList');
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:4,代码来源:DaysMeetingsFromCalendarModalListView.php


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