mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Correct whitespace / phpdoc
This commit is contained in:
parent
079b29bfff
commit
93085b9660
@ -298,32 +298,33 @@ class FormField extends RequestHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add one or more CSS-classes to the formfield-container.
|
||||
* Add one or more CSS-classes to the formfield-container. Multiple class
|
||||
* names should be space delimited.
|
||||
*
|
||||
* @param $class String
|
||||
* @param string $class
|
||||
*/
|
||||
public function addExtraClass($class) {
|
||||
//split at white space to extract all the classes
|
||||
$classes = preg_split('/\s+/', $class);
|
||||
|
||||
foreach ($classes as $class) {
|
||||
//add each class one by one
|
||||
$this->extraClasses[$class] = $class;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove one or more CSS-classes from the formfield-container.
|
||||
*
|
||||
* @param $class String
|
||||
* @param string $class
|
||||
*/
|
||||
public function removeExtraClass($class) {
|
||||
//split at white space to extract all the classes
|
||||
$classes = preg_split('/\s+/', $class);
|
||||
|
||||
foreach ($classes as $class) {
|
||||
//unset each class one by one
|
||||
unset($this->extraClasses[$class]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user