IHMInputOutputParamsMultiPlotClass.php
1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* @class IHMInputOutputParamsMultiPlotClass
* @brief Class that's implement an IHMInputOutputParamsPlotClass used to treat input/output of a "multiplot" request
* @details
*/
class IHMInputOutputParamsMultiPlotClass extends IHMInputOutputParamsPlotClass
{
/*
* @brief method to unmarshall a plot request
*/
public function unmarshallRequest($input) {
$this->isMultiPlot = TRUE;
$isAction = isset($input->{'action'});
if ($isAction) {
$multiplotInput = $this->loadIHMRequest('multiplot');
}
else {
$multiplotInput = $input;
}
foreach ($multiplotInput->plots as $index => $plot) {
if ($isAction) {
$crtInteractiveId = PLOT_RESULT_FILE_KEY."_".$plot->{'tab-index'};
if ((($input->{'action'}->action == 'zoom') || ($input->{'action'}->action == 'undozoom')) && ($input->{'action'}->axeId != 'timeAxis') && ($crtInteractiveId != $input->action->interactiveId)) {
continue;
}
$request = clone $input;
$request->action->interactiveId = $crtInteractiveId;
parent::unmarshallRequest($request);
}
else {
$plot->{'file-output'} = 'INTERACTIVE';
$plot->timesrc = $multiplotInput->timesrc;
$plot->timeTables = $multiplotInput->timeTables;
$plot->startDate = $multiplotInput->startDate;
$plot->stopDate = $multiplotInput->stopDate;
parent::unmarshallRequest($plot);
}
}
$this->saveIHMRequest('multiplot', $multiplotInput);
}
}
?>