mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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) {
|
public function addExtraClass($class) {
|
||||||
//split at white space to extract all the classes
|
|
||||||
$classes = preg_split('/\s+/', $class);
|
$classes = preg_split('/\s+/', $class);
|
||||||
|
|
||||||
foreach ($classes as $class) {
|
foreach ($classes as $class) {
|
||||||
//add each class one by one
|
$this->extraClasses[$class] = $class;
|
||||||
$this->extraClasses[$class] = $class;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove one or more CSS-classes from the formfield-container.
|
* Remove one or more CSS-classes from the formfield-container.
|
||||||
*
|
*
|
||||||
* @param $class String
|
* @param string $class
|
||||||
*/
|
*/
|
||||||
public function removeExtraClass($class) {
|
public function removeExtraClass($class) {
|
||||||
//split at white space to extract all the classes
|
|
||||||
$classes = preg_split('/\s+/', $class);
|
$classes = preg_split('/\s+/', $class);
|
||||||
|
|
||||||
foreach ($classes as $class) {
|
foreach ($classes as $class) {
|
||||||
//unset each class one by one
|
|
||||||
unset($this->extraClasses[$class]);
|
unset($this->extraClasses[$class]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user