1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* SubPanelSearchForm.php |
4
|
|
|
* @author SalesAgility <[email protected]> |
5
|
|
|
* Date: 28/01/14 |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
require_once('include/SearchForm/SearchForm2.php'); |
9
|
|
|
|
10
|
|
|
class SubPanelSearchForm extends SearchForm { |
11
|
|
|
|
12
|
|
|
var $subPanel; // the instantiated bean of the subPanel |
13
|
|
|
|
14
|
|
|
function __construct($seed, $module, $subPanel, $options = array()){ |
15
|
|
|
$this->subPanel = $subPanel; |
16
|
|
|
parent::__construct($seed, $module, 'DetailView', $options); |
|
|
|
|
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
21
|
|
|
*/ |
22
|
|
|
function SubPanelSearchForm($seed, $module, $subPanel, $options = array()){ |
23
|
|
|
$deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
24
|
|
|
if(isset($GLOBALS['log'])) { |
25
|
|
|
$GLOBALS['log']->deprecated($deprecatedMessage); |
26
|
|
|
} |
27
|
|
|
else { |
28
|
|
|
trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
29
|
|
|
} |
30
|
|
|
self::__construct($seed, $module, $subPanel, $options); |
31
|
|
|
} |
32
|
|
|
|
33
|
|
|
|
34
|
|
|
function display($header = false){ |
35
|
|
|
/*//global $app_list_strings; |
36
|
|
|
if($this->subPanel->subpanel_defs->isCollection() && isset($this->subPanel->subpanel_defs->base_collection_list)){ |
37
|
|
|
$GLOBALS['app_list_strings']['collection_temp_list'] = $this->getCollectionList($this->subPanel->subpanel_defs->base_collection_list); |
38
|
|
|
}*/ |
39
|
|
|
$this->th->ss->assign('subpanel', $this->subPanel->subpanel_id); |
40
|
|
|
|
41
|
|
|
// Adding the offset to subpanel search field - this has no affect on pagination |
42
|
|
|
if($this->subPanel->parent_bean->module_dir != ''){ |
43
|
|
|
$this->th->ss->assign('subpanelPageOffset', '<input type="hidden" name="'.$this->subPanel->parent_bean->module_dir.'_'.$this->subPanel->subpanel_id.'_CELL_offset" value="0" />'); |
44
|
|
|
} |
45
|
|
|
$this->parsedView = 'sps'; |
46
|
|
|
return parent::display($header); |
|
|
|
|
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
function getCollectionList($collection = array()){ |
50
|
|
|
global $app_list_strings; |
51
|
|
|
|
52
|
|
|
$select = array(); |
53
|
|
|
|
54
|
|
|
if(!empty($collection)){ |
55
|
|
|
|
56
|
|
|
$select = array(); |
57
|
|
|
foreach($collection as $name => $value_array){ |
58
|
|
|
if(isset($app_list_strings['moduleList'][$value_array['module']])){ |
59
|
|
|
$select[$name] = $app_list_strings['moduleList'][$value_array['module']]; |
60
|
|
|
} |
61
|
|
|
} |
62
|
|
|
} |
63
|
|
|
return $select; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
function displaySavedSearchSelect(){ |
67
|
|
|
return null; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
} |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.