File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
src/NotFound/Layout/Elements/Table Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace NotFound \Layout \Elements \Table ;
4
4
5
+ use stdClass ;
6
+
5
7
/**
6
8
* LayoutTableColumn
7
9
*
@@ -12,11 +14,21 @@ class LayoutTableColumn
12
14
public function __construct (
13
15
public string $ value ,
14
16
public string $ type = 'text ' ,
15
- public object $ properties = new \ stdClass (),
17
+ public object $ properties = new stdClass ()
16
18
) {
17
19
return $ this ;
18
20
}
19
21
22
+ public function setToggleEndPoint ( string $ url ) : self
23
+ {
24
+ if ( $ this ->type !== 'checkbox ' )
25
+ {
26
+ throw new \Exception ('Can only set toggle endpoint on checkbox type ' );
27
+ }
28
+ $ this ->properties ->toggleEndPoint = $ url ;
29
+ return $ this ;
30
+ }
31
+
20
32
public function makeLinkButton (string $ to , $ external = false ): self
21
33
{
22
34
$ this ->type = 'InputButton ' ;
You can’t perform that action at this time.
0 commit comments