* bug: try to infer the value of $title based on the module name and method name.

This commit is contained in:
liugang
2023-06-19 16:03:15 +08:00
parent 155871b266
commit faa5cb4f9e
+9 -1
View File
@@ -10,8 +10,16 @@ declare(strict_types=1);
*/
namespace zin;
function setCommonProps($bug, $title)
function setCommonProps(object $bug, string $title = ''): array
{
if(empty($title))
{
global $app, $lang;
$module = $app->getModuleName();
$method = $app->getMethodName();
$title = !empty($lang->$module->$method) ? $lang->$module->$method : zget($lang, $method);
}
$items[] = set::shadow(false);
$items[] = set::title($title);
$items[] = set::headingClass('modal-heading');