File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,23 @@ public function className($value)
142
142
return $ this ;
143
143
}
144
144
145
+ /**
146
+ * Append a class name to column.
147
+ *
148
+ * @param string $class
149
+ * @return $this
150
+ */
151
+ public function addClass ($ class )
152
+ {
153
+ if (! isset ($ this ->attributes ['className ' ])) {
154
+ $ this ->attributes ['className ' ] = $ class ;
155
+ } else {
156
+ $ this ->attributes ['className ' ] .= " $ class " ;
157
+ }
158
+
159
+ return $ this ;
160
+ }
161
+
145
162
/**
146
163
* Set text option value.
147
164
*
Original file line number Diff line number Diff line change @@ -54,6 +54,23 @@ public function selectClassName($value = 'selected')
54
54
return $ this ;
55
55
}
56
56
57
+ /**
58
+ * Append a class name to className option value.
59
+ *
60
+ * @param string $class
61
+ * @return $this
62
+ */
63
+ public function addClass ($ class )
64
+ {
65
+ if (! isset ($ this ->attributes ['className ' ])) {
66
+ $ this ->attributes ['className ' ] = $ class ;
67
+ } else {
68
+ $ this ->attributes ['className ' ] .= " $ class " ;
69
+ }
70
+ return $ this ;
71
+ }
72
+
73
+
57
74
/**
58
75
* Set select info option value.
59
76
*
You can’t perform that action at this time.
0 commit comments