30 parent::__construct($parent);
33 foreach ($this->parent->parent->objectTypes as $type) {
34 $infos = objects::infos($type);
35 foreach ($config->data[
'TABS'][$infos[
'tabGroup']] as $plug) {
36 $class = $plug[
'CLASS'];
37 if ($class == $infos[
'mainTab']) {
40 if (isset($this->tabs[$class])) {
44 $classInfos = pluglist::pluginInfos($class);
45 if (isset($classInfos[
'plFilterObject'])) {
46 $this->tabs[$class] = [
47 'filter' => $classInfos[
'plFilterObject'],
48 'infos' => $classInfos,
57 public function update ()
59 foreach ($this->tabs as $class => &$tab) {
60 $tab[
'checked'] = isset($_POST[
'filter_tab_'.$class]);
65 public function render ():
string 67 if (empty($this->tabs)) {
71 foreach ($this->tabs as $class => $tab) {
72 $inputs[
'filter_tab_'.$class] = [
73 'name' => $tab[
'infos'][
'plShortName'],
74 'desc' => $tab[
'infos'][
'plShortName'].
' '.$tab[
'filter'],
75 'icon' => (isset($tab[
'infos'][
'plSmallIcon']) ? $tab[
'infos'][
'plSmallIcon'] : NULL),
76 'checked' => $tab[
'checked'],
80 $smarty->assign(
'NAME', _(
'Tabs'));
81 $smarty->assign(
'INPUTS', $inputs);
85 public function getFilters (
string $type, array &$filters):
bool 87 foreach ($this->tabs as $tab) {
88 if ($tab[
'checked']) {
89 $filters[] = $tab[
'filter'];
get_template_path($filename='', $plugin=FALSE, $path='')
Return themed path for specified base file.
This class handles an element from the management filter box.
& get_smarty()
Get global smarty object.
This class handles the management filter box.
class_available($name)
Checks if a class is available.