Coding Standards

Changed to using null instead of '' and remove the ': ' at the end of the label value. (Though I myself quite like this..)
This commit is contained in:
wesleyh committed 2013-04-20 23:30:04 +03:00
1 parent 9587c6ccf9
commit b26a9e1072
1 file changed
+4 -3
+4 -3
View File
@@ -176,14 +176,15 @@ class FormBuilder {
* @param array $options
* @return string
*/
public function label($name, $value='', $options = array())
public function label($name, $value=null, $options = array())
{
$this->labels[] = $name;
$options = $this->html->attributes($options);
if (!$value) {
$value = ucfirst(str_replace('_', ' ', $name)) . ': ';
if (is_null($value))
{
$value = ucfirst(str_replace('_', ' ', $name));
}
return '<label for="'.$name.'"'.$options.'>'.e($value).'</label>';