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


PHP Report::getModuleClassName方法代码示例

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


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

示例1: getData

 /**
  * @param string $nodeId
  * @return array
  */
 public function getData($nodeId)
 {
     assert('is_string($nodeId)');
     $nodeId = $this->resolveNodeIdByRemovingTreeType($nodeId);
     $moduleClassName = $this->report->getModuleClassName();
     $modelToReportAdapter = $this->makeModelRelationsAndAttributesToReportAdapter($moduleClassName, $moduleClassName::getPrimaryModelName());
     $nodeIdPrefix = self::resolveNodeIdPrefixByNodeId($nodeId);
     $precedingModel = null;
     $precedingRelation = null;
     if ($nodeId != 'source') {
         self::resolvePrecedingModelRelationAndAdapterByNodeId($nodeId, $modelToReportAdapter, $precedingModel, $precedingRelation);
     } else {
         $nodeIdPrefix = null;
     }
     if ($nodeIdPrefix == null) {
         $data = array();
         $data[0] = array('expanded' => true, 'text' => $moduleClassName::getModuleLabelByTypeAndLanguage('Singular'));
     }
     $childrenNodeData = $this->getChildrenNodeData($modelToReportAdapter, $precedingModel, $precedingRelation, $nodeIdPrefix);
     if (!empty($childrenNodeData) && $nodeIdPrefix == null) {
         $data[0]['children'] = $childrenNodeData;
     } else {
         $data = $childrenNodeData;
     }
     return $data;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:30,代码来源:ReportRelationsAndAttributesToTreeAdapter.php

示例2: setCommonAttributes

 /**
  * @param ReportWizardForm $formModel
  */
 protected function setCommonAttributes(ReportWizardForm $formModel)
 {
     $formModel->id = $this->report->getId();
     $formModel->description = $this->report->getDescription();
     $formModel->moduleClassName = $this->report->getModuleClassName();
     if ($this->report->getOwner()->id > 0) {
         $formModel->ownerId = (int) $this->report->getOwner()->id;
         $formModel->ownerName = strval($this->report->getOwner());
     }
     $formModel->name = $this->report->getName();
     $formModel->type = $this->report->getType();
     $formModel->filtersStructure = $this->report->getFiltersStructure();
     $formModel->currencyConversionType = $this->report->getCurrencyConversionType();
     $formModel->spotConversionCurrencyCode = $this->report->getSpotConversionCurrencyCode();
     if ($this->report->isNew()) {
         $formModel->setIsNew();
     }
     $formModel->setExplicitReadWriteModelPermissions($this->report->getExplicitReadWriteModelPermissions());
     $formModel->filters = $this->report->getFilters();
     $formModel->orderBys = $this->report->getOrderBys();
     $formModel->groupBys = $this->report->getGroupBys();
     $formModel->displayAttributes = $this->report->getDisplayAttributes();
     $formModel->drillDownDisplayAttributes = $this->report->getDrillDownDisplayAttributes();
     $formModel->chart = $this->report->getChart();
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:28,代码来源:ReportToWizardFormAdapter.php

示例3: makeVariableStatesAttributeIndexes

 /**
  * @param array $filters
  * @return array
  */
 protected function makeVariableStatesAttributeIndexes(array $filters)
 {
     $moduleClassName = $this->report->getModuleClassName();
     $attributeIndexes = array();
     VariableStatesForReportUtil::resolveAttributeIndexes($moduleClassName::getPrimaryModelName(), $attributeIndexes);
     VariableStatesForReportUtil::resolveAttributeIndexesByComponents($attributeIndexes, $this->resolveDisplayAttributes());
     VariableStatesForReportUtil::resolveAttributeIndexesByComponents($attributeIndexes, $filters);
     VariableStatesForReportUtil::resolveAttributeIndexesByComponents($attributeIndexes, $this->report->getOrderBys());
     VariableStatesForReportUtil::resolveAttributeIndexesByComponents($attributeIndexes, $this->resolveGroupBys());
     return $attributeIndexes;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:15,代码来源:ReportDataProvider.php

示例4: resolveChart

 /**
  * @param array $data
  * @param Report $report
  */
 protected static function resolveChart($data, Report $report)
 {
     if ($report->getType() != Report::TYPE_SUMMATION) {
         return;
     }
     $moduleClassName = $report->getModuleClassName();
     if ($moduleClassName != null) {
         $modelClassName = $moduleClassName::getPrimaryModelName();
         $adapter = ModelRelationsAndAttributesToSummationReportAdapter::make($moduleClassName, $modelClassName, $report->getType());
         $seriesDataAndLabels = ReportUtil::makeDataAndLabelsForSeriesOrRange($adapter->getAttributesForChartSeries($report->getGroupBys(), $report->getDisplayAttributes()));
         $rangeDataAndLabels = ReportUtil::makeDataAndLabelsForSeriesOrRange($adapter->getAttributesForChartRange($report->getDisplayAttributes()));
     } else {
         $seriesDataAndLabels = array();
         $rangeDataAndLabels = array();
     }
     $chart = new ChartForReportForm($seriesDataAndLabels, $rangeDataAndLabels);
     if (null != ($chartData = ArrayUtil::getArrayValue($data, 'ChartForReportForm'))) {
         $chart->setAttributes($chartData);
     }
     $report->setChart($chart);
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:25,代码来源:DataToReportUtil.php

示例5: processAttributeAdditionFromTree

 /**
  * Process attribute addition from tree and than renders it.
  *
  * @param string $nodeId
  * @param string $treeType
  * @param Report $report
  * @param int $rowNumber
  * @param bool $trackableStructurePosition
  */
 public static function processAttributeAdditionFromTree($nodeId, $treeType, Report $report, $rowNumber, $trackableStructurePosition)
 {
     $nodeIdWithoutTreeType = ReportRelationsAndAttributesToTreeAdapter::removeTreeTypeFromNodeId($nodeId, $treeType);
     $moduleClassName = $report->getModuleClassName();
     $modelClassName = $moduleClassName::getPrimaryModelName();
     $form = new WizardActiveForm();
     $form->id = 'edit-form';
     $form->enableAjaxValidation = true;
     //ensures error validation populates correctly
     $wizardFormClassName = ReportToWizardFormAdapter::getFormClassNameByType($report->getType());
     $model = ComponentForReportFormFactory::makeByComponentType($moduleClassName, $modelClassName, $report->getType(), $treeType);
     $form->modelClassNameForError = $wizardFormClassName;
     $attribute = ReportRelationsAndAttributesToTreeAdapter::resolveAttributeByNodeId($nodeIdWithoutTreeType);
     $model->attributeIndexOrDerivedType = ReportRelationsAndAttributesToTreeAdapter::resolveAttributeByNodeId($nodeIdWithoutTreeType);
     $inputPrefixData = ReportRelationsAndAttributesToTreeAdapter::resolveInputPrefixData($wizardFormClassName, $treeType, (int) $rowNumber);
     $adapter = new ReportAttributeToElementAdapter($inputPrefixData, $model, $form, $treeType);
     $view = new AttributeRowForReportComponentView($adapter, (int) $rowNumber, $inputPrefixData, $attribute, (bool) $trackableStructurePosition, true, $treeType);
     $content = $view->render();
     $form->renderAddAttributeErrorSettingsScript($view::getFormId());
     Yii::app()->getClientScript()->setToAjaxMode();
     Yii::app()->getClientScript()->render($content);
     echo $content;
 }
开发者ID:RamaKavanan,项目名称:InitialVersion,代码行数:32,代码来源:ReportUtil.php

示例6: makeComponentFormAndPopulateReportFromData

 /**
  * @param array $componentFormsData
  * @param Report $report
  * @param null|string $componentPrefix
  */
 protected static function makeComponentFormAndPopulateReportFromData($componentFormsData, Report $report, $componentPrefix)
 {
     $moduleClassName = $report->getModuleClassName();
     $addMethodName = 'add' . $componentPrefix;
     $componentClassName = $componentPrefix . 'ForReportForm';
     $rowKey = 0;
     foreach ($componentFormsData as $componentFormData) {
         $component = new $componentClassName($moduleClassName, $moduleClassName::getPrimaryModelName(), $report->getType(), $rowKey);
         $component->setAttributes($componentFormData);
         $report->{$addMethodName}($component);
         $rowKey++;
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:18,代码来源:SavedReportToReportAdapter.php

示例7: saveCalendarWithSerializedData

 /**
  * Save calendar with serialized data.
  * @param Report $report
  * @param SavedCalendar $savedCalendar
  * @param array $wizardFormPostData
  * @throws FailedToSaveModelException
  */
 public static function saveCalendarWithSerializedData(Report $report, SavedCalendar $savedCalendar, $wizardFormPostData)
 {
     $filtersData = ArrayUtil::getArrayValue($wizardFormPostData, ComponentForReportForm::TYPE_FILTERS);
     if ($filtersData != null) {
         $sanitizedFiltersData = DataToReportUtil::sanitizeFiltersData($report->getModuleClassName(), $report->getType(), $filtersData);
         $unserializedData = array(ComponentForReportForm::TYPE_FILTERS => $sanitizedFiltersData, 'filtersStructure' => $report->getFiltersStructure());
         $savedCalendar->serializedData = serialize($unserializedData);
     }
     if (!$savedCalendar->save()) {
         throw new FailedToSaveModelException();
     }
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:19,代码来源:CalendarUtil.php


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