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


PHP Report::getId方法代码示例

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


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

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

示例2: ReportFolder

$do_report_folder = new ReportFolder();
$report_folders = $do_report_folder->get_report_folders();

$report_name = '';
$idreport_folder = 0 ;
$description = '';

$e_set_report_data = new Event("Report->eventSaveReport");
$e_set_report_data->addParam("step","7");
	
if (isset($edit) && $edit == 1) {
	$edit_msg = _('Update Report');
	$e_set_report_data->addParam("mode","edit");
	$e_set_report_data->addParam("sqrecord",$sqcrm_record_id);
	$do_report = new Report();
	$do_report->getId($sqcrm_record_id);
	$report_name = $do_report->name;
	$idreport_folder = $do_report->idreport_folder;
	$description = $do_report->description;
} else {
	$edit_msg = _('Create Report');
	$e_set_report_data->addParam("mode","add");
}
echo '<form class="form-horizontal" id="Report__eventSaveReport" name="Report__eventSaveReport" action="/eventcontroler.php" method="post">';
echo $e_set_report_data->getFormEvent();
?>
<div class="container-fluid">
	<div class="row">
		<div class="col-md-12">
			<div class="box_content">
				<p><strong><?php echo $edit_msg;?> > <?php echo _('Step 7');?></strong></p>
开发者ID:sQcrm,项目名称:sqcrm,代码行数:31,代码来源:create_report_step7_view.php

示例3: setReport

 public function setReport(Report $report)
 {
     $this->rid = $report->getId();
 }
开发者ID:mpetcu,项目名称:lime-juice,代码行数:4,代码来源:Job.php

示例4: array

    // CUSTOM REPORTS
    $reports = array_var($customReports, $type_id, array());
    ?>
<div class="report_header"><?php 
    echo lang('custom reports');
    ?>
</div>
<?php 
    if (count($reports) > 0) {
        ?>
	<ul>
	<?php 
        foreach ($reports as $report) {
            ?>
		<li style="padding-top:4px"><div><a style="font-weight:bold;margin-right:15px" class="internalLink" href="<?php 
            echo get_url('reporting', 'view_custom_report', array('id' => $report->getId()));
            ?>
"><?php 
            echo $report->getObjectName();
            ?>
</a>
			<?php 
            if ($report->canEdit(logged_user())) {
                ?>
				<a style="margin-right:5px" class="internalLink coViewAction ico-edit" href="<?php 
                echo get_url('reporting', 'edit_custom_report', array('id' => $report->getId()));
                ?>
"><?php 
                echo lang('edit');
                ?>
</a>
开发者ID:rorteg,项目名称:fengoffice,代码行数:31,代码来源:index.php

示例5: array

 function add_custom_report()
 {
     if (logged_user()->isGuest()) {
         flash_error(lang('no access permissions'));
         ajx_current("empty");
         return;
     }
     tpl_assign('url', get_url('reporting', 'add_custom_report'));
     $report_data = array_var($_POST, 'report');
     if (is_array($report_data)) {
         tpl_assign('report_data', $report_data);
         $conditions = array_var($_POST, 'conditions');
         if (!is_array($conditions)) {
             $conditions = array();
         }
         tpl_assign('conditions', $conditions);
         $columns = array_var($_POST, 'columns');
         if (is_array($columns) && count($columns) > 0) {
             tpl_assign('columns', $columns);
             $newReport = new Report();
             if (!$newReport->canAdd(logged_user())) {
                 flash_error(lang('no access permissions'));
                 ajx_current("empty");
                 return;
             }
             // if
             $newReport->setName($report_data['name']);
             $newReport->setDescription($report_data['description']);
             $newReport->setObjectType($report_data['object_type']);
             $newReport->setOrderBy($report_data['order_by']);
             $newReport->setIsOrderByAsc($report_data['order_by_asc'] == 'asc');
             try {
                 DB::beginWork();
                 $newReport->save();
                 $allowed_columns = $this->get_allowed_columns($report_data['object_type'], true);
                 foreach ($conditions as $condition) {
                     if ($condition['deleted'] == "1") {
                         continue;
                     }
                     foreach ($allowed_columns as $ac) {
                         if ($condition['field_name'] == $ac['id']) {
                             $newCondition = new ReportCondition();
                             $newCondition->setReportId($newReport->getId());
                             $newCondition->setCustomPropertyId($condition['custom_property_id']);
                             $newCondition->setFieldName($condition['field_name']);
                             $newCondition->setCondition($condition['condition']);
                             $condValue = array_key_exists('value', $condition) ? $condition['value'] : '';
                             if ($condition['field_type'] == 'boolean') {
                                 $newCondition->setValue(array_key_exists('value', $condition));
                             } else {
                                 if ($condition['field_type'] == 'date') {
                                     if ($condValue != '') {
                                         $dtFromWidget = DateTimeValueLib::dateFromFormatAndString(user_config_option('date_format'), $condValue);
                                         $newCondition->setValue(date("m/d/Y", $dtFromWidget->getTimestamp()));
                                     }
                                 } else {
                                     $newCondition->setValue($condValue);
                                 }
                             }
                             $newCondition->setIsParametrizable(isset($condition['is_parametrizable']));
                             $newCondition->save();
                         }
                     }
                 }
                 asort($columns);
                 //sort the array by column order
                 foreach ($columns as $column => $order) {
                     if ($order > 0) {
                         $newColumn = new ReportColumn();
                         $newColumn->setReportId($newReport->getId());
                         if (is_numeric($column)) {
                             $newColumn->setCustomPropertyId($column);
                         } else {
                             $newColumn->setFieldName($column);
                         }
                         $newColumn->save();
                     }
                 }
                 DB::commit();
                 flash_success(lang('custom report created'));
                 ajx_current('back');
             } catch (Exception $e) {
                 DB::rollback();
                 flash_error($e->getMessage());
                 ajx_current("empty");
             }
         }
     }
     $selected_type = array_var($_GET, 'type', '');
     $types = array(array("", lang("select one")), array("Companies", lang("companies")), array("Contacts", lang("contacts")), array("MailContents", lang("email type")), array("ProjectEvents", lang("events")), array("ProjectFiles", lang("file")), array("ProjectMilestones", lang("milestone")), array("ProjectMessages", lang("message")), array("ProjectTasks", lang("task")), array("Users", lang("user")), array("ProjectWebpages", lang("webpage")), array("Projects", lang("workspace")));
     if ($selected_type != '') {
         tpl_assign('allowed_columns', $this->get_allowed_columns($selected_type));
     }
     tpl_assign('object_types', $types);
     tpl_assign('selected_type', $selected_type);
 }
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:96,代码来源:ReportingController.class.php

示例6: __construct

 public function __construct(Report $report)
 {
     $this->_report = $report;
     KalturaLog::debug('Report #' . $report->getId());
 }
开发者ID:kubrickfr,项目名称:server,代码行数:5,代码来源:kReportManager.php

示例7: array

	// CUSTOM REPORTS
	$reports = array_var($customReports, $type_id, array());
	
?>
<div class="report_header"><?php echo lang('custom reports') ?></div>
<?php 
	if(count($reports) > 0){
		$alt = true;
?>
	<ul>
	<?php foreach($reports as $report){
			$alt = !$alt; 
	?>
		<li style="padding-top:4px">
		<div style="max-width:700px;<?php echo $alt ? 'background-color:#ECEFF7;' : '';?>">
			<a style="font-weight:bold;margin-right:15px" class="internalLink" href="<?php echo get_url('reporting','view_custom_report', array('id' => $report->getId()))?>"><?php echo $report->getObjectName() ?></a>
			<div style="float:right;padding-left:15px;">
			<?php if ($report->canEdit(logged_user())) { ?>
				<a style="margin-right:5px" class="internalLink coViewAction ico-edit" href="<?php echo get_url('reporting','edit_custom_report', array('id' => $report->getId()))?>"><?php echo lang('edit') ?></a>
			<?php } ?>
			<?php if ($report->canDelete(logged_user())) { ?>
				<a style="margin-right:5px" class="internalLink coViewAction ico-delete" href="javascript:og.deleteReport(<?php echo $report->getId() ?>)"><?php echo lang('delete') ?></a>
			<?php } ?>
			</div>
			<div style="float:right;max-width:700px;" id="report-<?php echo $report->getId();?>">
				<span class="breadcrumb"></span>
				<script>
					<?php $crumbOptions = json_encode($report->getMembersToDisplayPath());
					$crumbJs = " og.getCrumbHtml($crumbOptions) ";?>
					var crumbHtml = <?php echo $crumbJs;?>;
					$("#report-<?php echo $report->getId()?> .breadcrumb").html(crumbHtml);
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:index.php

示例8: delete

 public function delete(Report &$report)
 {
     $this->db->query("delete from Report where id=" . $report->getId());
 }
开发者ID:basvandervlies,项目名称:pakiti3,代码行数:4,代码来源:ReportDao.php

示例9: generatePDFReport

 function generatePDFReport(Report $report, $results)
 {
     $results['columns'][] = lang("status");
     $types = self::get_report_column_types($report->getId());
     $ot = ObjectTypes::findById($report->getReportObjectTypeId());
     eval('$managerInstance = ' . $ot->getHandlerClass() . "::instance();");
     $externalCols = $managerInstance->getExternalColumns();
     $filename = str_replace(' ', '_', $report->getObjectName()) . date('_YmdHis');
     $pageLayout = $_POST['pdfPageLayout'];
     $fontSize = $_POST['pdfFontSize'];
     include_once LIBRARY_PATH . '/pdf/fpdf.php';
     $pdf = new FPDF($pageLayout);
     $pdf->setTitle($report->getObjectName());
     $pdf->AddPage();
     $pdf->SetFont('Arial', '', $fontSize);
     $pdf->Cell(80);
     $report_title = iconv(mb_internal_encoding(), "ISO-8859-1", html_entity_decode($report->getObjectName(), ENT_COMPAT));
     $pdf->Cell(30, 10, $report_title);
     $pdf->Ln(20);
     $colSizes = array();
     $maxValue = array();
     $fixed_col_sizes = array();
     foreach ($results['rows'] as $row) {
         $i = 0;
         array_shift($row);
         foreach ($row as $k => $value) {
             if (!isset($maxValue[$i])) {
                 $maxValue[$i] = '';
             }
             if (strlen(strip_tags($value)) > strlen($maxValue[$i])) {
                 $maxValue[$i] = strip_tags($value);
             }
             $i++;
         }
     }
     $k = 0;
     foreach ($maxValue as $str) {
         $col_title_len = $pdf->GetStringWidth($results['columns'][$k]);
         $colMaxTextSize = max($pdf->GetStringWidth($str), $col_title_len);
         $db_col = $results['columns'][$k];
         $colType = array_var($types, array_var($results['db_columns'], $db_col, ''), '');
         if ($colType == DATA_TYPE_DATETIME && !($report->getObjectTypeName() == 'event' && $results['db_columns'][$db_col] == 'start')) {
             $colMaxTextSize = $colMaxTextSize / 2;
             if ($colMaxTextSize < $col_title_len) {
                 $colMaxTextSize = $col_title_len;
             }
         }
         $fixed_col_sizes[$k] = $colMaxTextSize;
         $k++;
     }
     $fixed_col_sizes = self::fix_column_widths($pageLayout == 'P' ? 172 : 260, $fixed_col_sizes);
     $max_char_len = array();
     $i = 0;
     foreach ($results['columns'] as $col) {
         $colMaxTextSize = $fixed_col_sizes[$i];
         $colFontSize = $colMaxTextSize + 5;
         $colSizes[$i] = $colFontSize;
         $col_name = iconv(mb_internal_encoding(), "ISO-8859-1", html_entity_decode($col, ENT_COMPAT));
         $pdf->Cell($colFontSize, 7, $col_name);
         $max_char_len[$i] = self::get_max_length_from_pdfsize($pdf, $colFontSize);
         $i++;
     }
     $lastColX = $pdf->GetX();
     $pdf->Ln();
     $pdf->Line($pdf->GetX(), $pdf->GetY(), $lastColX, $pdf->GetY());
     foreach ($results['rows'] as $row) {
         $i = 0;
         $more_lines = array();
         $col_offsets = array();
         foreach ($row as $k => $value) {
             if ($k == 'object_type_id') {
                 continue;
             }
             $db_col = isset($results['db_columns'][$results['columns'][$i]]) ? $results['db_columns'][$results['columns'][$i]] : '';
             $cell = format_value_to_print($db_col, html_to_text($value), $k == 'link' ? '' : array_var($types, $k), array_var($row, 'object_type_id'), '', is_numeric(array_var($results['db_columns'], $k)) ? "Y-m-d" : user_config_option('date_format'));
             $cell = iconv(mb_internal_encoding(), "ISO-8859-1", html_entity_decode($cell, ENT_COMPAT));
             $splitted = self::split_column_value($cell, $max_char_len[$i]);
             $cell = $splitted[0];
             if (count($splitted) > 1) {
                 array_shift($splitted);
                 $ml = 0;
                 foreach ($splitted as $sp_val) {
                     if (!isset($more_lines[$ml]) || !is_array($more_lines[$ml])) {
                         $more_lines[$ml] = array();
                     }
                     $more_lines[$ml][$i] = $sp_val;
                     $ml++;
                 }
                 $col_offsets[$i] = $pdf->x;
             }
             $pdf->Cell($colSizes[$i], 7, $cell);
             $i++;
         }
         foreach ($more_lines as $ml_values) {
             $pdf->Ln();
             foreach ($ml_values as $col_idx => $col_val) {
                 $pdf->SetX($col_offsets[$col_idx]);
                 $pdf->Cell($colSizes[$col_idx], 7, $col_val);
             }
         }
//.........这里部分代码省略.........
开发者ID:rorteg,项目名称:fengoffice,代码行数:101,代码来源:ReportingController.class.php

示例10: addInstanceToPool

 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      Report $value A Report object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(Report $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:22,代码来源:BaseReportPeer.php

示例11: setLastReportId

 public function setLastReportId(Host &$host, Report &$report)
 {
     if ($host == null || $host->getId() == -1 || $report == null || $report->getId() == -1) {
         Utils::log(LOG_DEBUG, "Exception", __FILE__, __LINE__);
         throw new Exception("Host or Report pobject is not valid or Host.id or Report.id is not set");
     }
     return $this->getPakiti()->getDao("Host")->setLastReportId($host->getId(), $report->getId());
 }
开发者ID:basvandervlies,项目名称:pakiti3,代码行数:8,代码来源:HostsManager.php

示例12: newQuestion

 public function newQuestion($id)
 {
     try {
         $report = new Report($id);
         if (!$report->allowQuestion()) {
             throw new fValidationException('Not allowed to ask question.');
         }
         $category = fRequest::get('category', 'integer');
         if ($category == 0) {
             throw new fValidationException('Please choose a category.');
         }
         $question = new Question();
         $question->setUsername(fAuthorization::getUserToken());
         $question->setReportId($report->getId());
         if ($category < 0) {
             $question->setCategory($category);
         } else {
             $question->setCategory(Question::ABOUT_PROBLEM_HIDDEN);
             $problem = new Problem($category);
             $question->setProblemId($problem->getId());
         }
         $question->setAskTime(new fTimestamp());
         $question->setQuestion(trim(fRequest::get('question')));
         if (strlen($question->getQuestion()) < 10) {
             throw new fValidationException('Question too short (minimum 10 bytes).');
         }
         if (strlen($question->getQuestion()) > 500) {
             throw new fValidationException('Question too long (maximum 500 bytes).');
         }
         $question->store();
         fMessaging::create('success', 'Question saved.');
     } catch (fExpectedException $e) {
         fMessaging::create('warning', $e->getMessage());
     } catch (fUnexpectedException $e) {
         fMessaging::create('error', $e->getMessage());
     }
     Util::redirect("/contest/{$id}");
 }
开发者ID:daerduoCarey,项目名称:oj,代码行数:38,代码来源:ReportController.php

示例13: addInstanceToPool

 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      Report $value A Report object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(Report $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         if (isset(self::$instances[$key]) || count(self::$instances) < kConf::get('max_num_instances_in_pool')) {
             self::$instances[$key] = $obj;
             kMemoryManager::registerPeer('ReportPeer');
         }
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:24,代码来源:BaseReportPeer.php

示例14: updateReport

 public function updateReport(Report &$report)
 {
     if ($report == null || $report->getId() == -1) {
         Utils::log(LOG_DEBUG, "Exception", __FILE__, __LINE__);
         throw new Exception("Report object is not valid or Report.id is not set");
     }
     Utils::log(LOG_DEBUG, "Updating the report", __FILE__, __LINE__);
     $this->getPakiti()->getDao("Report")->update($report);
 }
开发者ID:basvandervlies,项目名称:pakiti3,代码行数:9,代码来源:ReportsManager.php


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