10
10
use Atk4 \Ui \JsChain ;
11
11
use Atk4 \Ui \Table ;
12
12
use Atk4 \Ui \UserAction \ExecutorInterface ;
13
+ use Atk4 \Ui \View ;
13
14
14
15
/**
15
16
* Formatting action buttons column.
@@ -33,10 +34,10 @@ protected function init(): void
33
34
*
34
35
* Returns button object
35
36
*
36
- * @param \Atk4\Ui\ View|string $button
37
+ * @param View|string $button
37
38
* @param JsChain|\Closure|ExecutorInterface $action
38
39
*
39
- * @return \Atk4\Ui\ View
40
+ * @return View
40
41
*/
41
42
public function addButton ($ button , $ action = null , string $ confirmMsg = '' , $ isDisabled = false )
42
43
{
@@ -47,7 +48,7 @@ public function addButton($button, $action = null, string $confirmMsg = '', $isD
47
48
$ button = [1 => $ button ];
48
49
}
49
50
50
- $ button = Factory::factory ([\ Atk4 \ Ui \ Button::class], Factory::mergeSeeds ($ button , ['id ' => false ]));
51
+ $ button = Factory::factory ([Button::class], Factory::mergeSeeds ($ button , ['id ' => false ]));
51
52
}
52
53
53
54
if ($ isDisabled === true ) {
@@ -71,12 +72,12 @@ public function addButton($button, $action = null, string $confirmMsg = '', $isD
71
72
* Adds a new button which will open a modal dialog and dynamically
72
73
* load contents through $callback. Will pass a virtual page.
73
74
*
74
- * @param \Atk4\Ui\ View|string $button
75
- * @param string|array $defaults modal title or modal defaults array
76
- * @param \Atk4\Ui\ View $owner
77
- * @param array $args
75
+ * @param View|string $button
76
+ * @param string|array $defaults modal title or modal defaults array
77
+ * @param View $owner
78
+ * @param array $args
78
79
*
79
- * @return \Atk4\Ui\ View
80
+ * @return View
80
81
*/
81
82
public function addModal ($ button , $ defaults , \Closure $ callback , $ owner = null , $ args = [])
82
83
{
@@ -90,7 +91,7 @@ public function addModal($button, $defaults, \Closure $callback, $owner = null,
90
91
91
92
$ modal ->observeChanges (); // adds scrollbar if needed
92
93
93
- $ modal ->set (function (\ Atk4 \ Ui \ Modal $ t ) use ($ callback ) {
94
+ $ modal ->set (function (View $ t ) use ($ callback ) {
94
95
$ callback ($ t , $ t ->stickyGet ($ this ->name ));
95
96
});
96
97
0 commit comments