FormManager->Type->TypeDefinitionList[$Item['Type']]; if ($Item['Value'] != '') { $Output = ''.$Item['Filter'].''; } else $Output = ''; return $Output; } function OnEdit(array $Item): string { $Output = ''; if ($this->FormManager->ShowRelation) { $URL = ''; if (array_key_exists('OnPreset', $Item)) { $Preset = call_user_func($Item['OnPreset'], $Item['Values']); $URL = str_replace('&', '&', '&'.http_build_query($Preset)); } $Output .= ''; $Output .= ''; } return $Output; } function OnLoad(array $Item): ?string { if ($_POST[$Item['Name']] == '') return NULL; else return $_POST[$Item['Name']]; } function OnLoadDb(array $Item): ?string { if ($Item['Value'] == '') return NULL; else return $Item['Value']; } function OnFilterName(array $Item): string { return '`'.$Item['Name'].'_Filter`'; } function OnFilterNameQuery(array $Item): string { $Type = $this->FormManager->Type->TypeDefinitionList[$Item['Type']]; //if ($Item['Value'] != '') //{ if (array_key_exists('View', $Type['Parameters'])) $Table = $Type['Parameters']['View']; else $Table = $Type['Parameters']['Table']; $Output = '`'.$Item['Name'].'`, (SELECT '.$Type['Parameters']['Name'].''. ' AS `Name` FROM '.$Table.' WHERE `'. $Type['Parameters']['Id'].'`=`TX`.`'.$Item['Name'].'`) AS `'.$Item['Name'].'_Filter`'; //} else $Output = '`'.$Item['Name'].'`, `'.$Item['Name'].'` AS `'.$Item['Name'].'_Filter`'; return $Output; } }