+ [task#144531] add isclickable method.

This commit is contained in:
liyang
2025-06-16 16:36:27 +08:00
parent e5a83c1360
commit 395875decf
+17 -16
View File
@@ -13,6 +13,23 @@ declare(strict_types=1);
*/
class compileModel extends model
{
/**
* 判断按钮是否可点击。
* Judge an action is clickable or not.
*
* @param object $compile
* @param string $action
* @static
* @access public
* @return bool
*/
public static function isClickable(object $compile, string $action): bool
{
if($action == 'result') return !empty($compile->testtask);
return true;
}
/**
* Get by id
*
@@ -390,20 +407,4 @@ class compileModel extends model
return !dao::isError();
}
/**
* 判断按钮是否可点击。
* Judge an action is clickable or not.
*
* @param object $compile
* @param string $action
* @static
* @access public
* @return bool
*/
public static function isClickable(object $compile, string $action): bool
{
if($action == 'result') return !empty($compile->testtask);
return true;
}
}