+ [task#144531] add isclickable method.
This commit is contained in:
+17
-16
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user