File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 7
7
trait VisibleCondition
8
8
{
9
9
/**
10
- * @var Closure|null
10
+ * @var Closure|bool
11
11
*/
12
12
protected $ visibleCondition = true ;
13
13
Original file line number Diff line number Diff line change 7
7
trait Visibled
8
8
{
9
9
/**
10
- * @var bool|callable
10
+ * @var Closure|bool
11
11
*/
12
12
protected $ visibled = true ;
13
13
14
14
/**
15
- * @return bool|callable
15
+ * @return Closure|bool
16
16
*/
17
17
public function getVisibled ()
18
18
{
19
- if (is_bool ($ this ->visibled )) {
20
- return $ this ->visibled ;
19
+ if (is_callable ($ this ->visibled )) {
20
+ return ( bool ) call_user_func ( $ this ->visibled , $ this -> getModel ()) ;
21
21
}
22
22
23
- return (bool ) $ this ->getValueFromObject ( $ this -> getModel (), $ this -> visibled ) ;
23
+ return (bool ) $ this ->visibled ;
24
24
}
25
25
26
26
/**
You can’t perform that action at this time.
0 commit comments