Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c55fda58b1 | ||
|
|
8ae4aa0627 | ||
|
|
e884f50d1c | ||
|
|
6b023d8055 |
No files matched your search
+3
-3
@@ -358,9 +358,6 @@ class HtmlBuilder {
|
|||||||
{
|
{
|
||||||
$html = array();
|
$html = array();
|
||||||
|
|
||||||
// For numeric keys we will assume that the key and the value are the same
|
|
||||||
// as this will convert HTML attributes such as "required" to a correct
|
|
||||||
// form like required="required" instead of using incorrect numerics.
|
|
||||||
foreach ((array) $attributes as $key => $value)
|
foreach ((array) $attributes as $key => $value)
|
||||||
{
|
{
|
||||||
$element = $this->attributeElement($key, $value);
|
$element = $this->attributeElement($key, $value);
|
||||||
@@ -380,6 +377,9 @@ class HtmlBuilder {
|
|||||||
*/
|
*/
|
||||||
protected function attributeElement($key, $value)
|
protected function attributeElement($key, $value)
|
||||||
{
|
{
|
||||||
|
// For numeric keys we will assume that the key and the value are the same
|
||||||
|
// as this will convert HTML attributes such as "required" to a correct
|
||||||
|
// form like required="required" instead of using incorrect numerics.
|
||||||
if (is_numeric($key)) $key = $value;
|
if (is_numeric($key)) $key = $value;
|
||||||
|
|
||||||
if ( ! is_null($value)) return $key.'="'.e($value).'"';
|
if ( ! is_null($value)) return $key.'="'.e($value).'"';
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class HtmlServiceProvider extends ServiceProvider {
|
|||||||
*/
|
*/
|
||||||
public function provides()
|
public function provides()
|
||||||
{
|
{
|
||||||
return array('html', 'form');
|
return array('html', 'form', 'Collective\Html\HtmlBuilder', 'Collective\Html\FormBuilder');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user