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


PHP GetUtil类代码示例

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


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

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

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

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

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

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

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

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

示例9: makeRedBeanDataProviderByDataCollection

 /**
  * Utilizes information from the dataCollection object to
  * make a RedBeanDataProvider.  Either looks at saved search information or params in the $_GET array.
  * variables:
  *  modelName_sort
  *  modelName
  *  where modelName is Account for example.
  * Typically utilized by a listView action.
  */
 public function makeRedBeanDataProviderByDataCollection($searchModel, $pageSize, $stateMetadataAdapterClassName = null, $dataCollection = null)
 {
     assert('is_int($pageSize)');
     assert('$stateMetadataAdapterClassName == null || is_string($stateMetadataAdapterClassName)');
     assert('$dataCollection instanceof SearchAttributesDataCollection || $dataCollection == null');
     $listModelClassName = get_class($searchModel->getModel());
     if ($dataCollection == null) {
         $dataCollection = new SearchAttributesDataCollection($searchModel);
     }
     $searchAttributes = $dataCollection->resolveSearchAttributesFromSourceData();
     $dataCollection->resolveAnyMixedAttributesScopeForSearchModelFromSourceData();
     $dataCollection->resolveSelectedListAttributesForSearchModelFromSourceData();
     $sanitizedSearchAttributes = GetUtil::sanitizePostByDesignerTypeForSavingModel($searchModel, $searchAttributes);
     $sortAttribute = SearchUtil::resolveSortAttributeFromGetArray($listModelClassName);
     $sortDescending = SearchUtil::resolveSortDescendingFromGetArray($listModelClassName);
     $metadataAdapter = new SearchDataProviderMetadataAdapter($searchModel, Yii::app()->user->userModel->id, $sanitizedSearchAttributes);
     $metadata = static::resolveDynamicSearchMetadata($searchModel, $metadataAdapter->getAdaptedMetadata(), $dataCollection);
     return RedBeanModelDataProviderUtil::makeDataProvider($metadata, $listModelClassName, 'RedBeanModelDataProvider', $sortAttribute, $sortDescending, $pageSize, $stateMetadataAdapterClassName);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:28,代码来源:Controller.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: processDynamicSearchAttributesDataForSavingModelRecursively

 protected static function processDynamicSearchAttributesDataForSavingModelRecursively($searchModel, &$searchAttributeData)
 {
     $processRecursively = false;
     foreach ($searchAttributeData as $attributeName => $attributeData) {
         if (isset($attributeData['relatedModelData']) && is_array($attributeData) && $attributeData['relatedModelData'] == true) {
             assert('count($attributeData) == 2');
             $processRecursively = true;
             break;
         }
     }
     if ($processRecursively) {
         $modelToUse = self::resolveModelToUseByModelAndAttributeName($searchModel, $attributeName);
         self::processDynamicSearchAttributesDataForSavingModelRecursively($modelToUse, $searchAttributeData[$attributeName]);
     } else {
         $searchAttributeData = GetUtil::sanitizePostByDesignerTypeForSavingModel($searchModel, $searchAttributeData);
     }
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:17,代码来源:SearchUtil.php

示例14: resolveRouteParameters

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

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


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