We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bff4f72 commit a6bf0b2Copy full SHA for a6bf0b2
src/Html/Options/Plugins/Select.php
@@ -54,6 +54,23 @@ public function selectClassName($value = 'selected')
54
return $this;
55
}
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
74
/**
75
* Set select info option value.
76
*
0 commit comments