/** * * @param PersistentObject $targetObject * @param string $targetMethod * @param string $targetMethodParameters * @param string $bps * @param string $target window or tab * * @return string */ public static function window($targetObject, $targetMethod, $targetMethodParameters = "", $bps = null, $target = null) { $useID = "-1"; if (!$targetObject instanceof Collection) { $useID = $targetObject->getID() == "" ? "-1" : $targetObject->getID(); } if (!is_numeric($useID)) { $useID = "'{$useID}'"; } return "windowWithRme('" . str_replace("GUI", "", get_class($targetObject)) . "', {$useID}, '{$targetMethod}', " . (is_array($targetMethodParameters) ? "['" . implode("','", $targetMethodParameters) . "']" : "'{$targetMethodParameters}'") . ($bps != null ? ", '{$bps}'" : "") . ($target != null ? ", '{$target}'" : "") . "); "; }