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)
142142 return $ this ;
143143 }
144144
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+
145162 /**
146163 * Set text option value.
147164 *
Original file line number Diff line number Diff line change @@ -54,6 +54,23 @@ public function selectClassName($value = 'selected')
5454 return $ this ;
5555 }
5656
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+
5774 /**
5875 * Set select info option value.
5976 *
You can’t perform that action at this time.
0 commit comments