Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
ad14938c
Commit
ad14938c
authored
Jun 04, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #760 from cviebrock/develop
Fix whitespace issues in laravel/form.php
parents
ba088022
1cc33dea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
30 deletions
+30
-30
form.php
laravel/form.php
+30
-30
No files found.
laravel/form.php
View file @
ad14938c
...
...
@@ -8,7 +8,7 @@ class Form {
* @var array
*/
public
static
$labels
=
array
();
/**
* The registered custom macros.
*
...
...
@@ -16,13 +16,13 @@ class Form {
*/
public
static
$macros
=
array
();
/**
* Registers a custom macro.
*
* @param string $name
* @param Closure $input
* @return void
*/
/**
* Registers a custom macro.
*
* @param string $name
* @param Closure $input
* @return void
*/
public
static
function
macro
(
$name
,
$macro
)
{
static
::
$macros
[
$name
]
=
$macro
;
...
...
@@ -56,7 +56,7 @@ class Form {
$method
=
strtoupper
(
$method
);
$attributes
[
'method'
]
=
static
::
method
(
$method
);
$attributes
[
'action'
]
=
static
::
action
(
$action
,
$https
);
// If a character encoding has not been specified in the attributes, we will
...
...
@@ -128,7 +128,7 @@ class Form {
* @param array $attributes
* @param bool $https
* @return string
*/
*/
public
static
function
open_for_files
(
$action
=
null
,
$method
=
'POST'
,
$attributes
=
array
(),
$https
=
null
)
{
$attributes
[
'enctype'
]
=
'multipart/form-data'
;
...
...
@@ -143,7 +143,7 @@ class Form {
* @param string $method
* @param array $attributes
* @return string
*/
*/
public
static
function
open_secure_for_files
(
$action
=
null
,
$method
=
'POST'
,
$attributes
=
array
())
{
return
static
::
open_for_files
(
$action
,
$method
,
$attributes
,
true
);
...
...
@@ -181,7 +181,7 @@ class Form {
* @param string $value
* @param array $attributes
* @return string
*/
*/
public
static
function
label
(
$name
,
$value
,
$attributes
=
array
())
{
static
::
$labels
[]
=
$name
;
...
...
@@ -209,7 +209,7 @@ class Form {
* @param mixed $value
* @param array $attributes
* @return string
*/
*/
public
static
function
input
(
$type
,
$name
,
$value
=
null
,
$attributes
=
array
())
{
$name
=
(
isset
(
$attributes
[
'name'
]))
?
$attributes
[
'name'
]
:
$name
;
...
...
@@ -240,7 +240,7 @@ class Form {
* @param string $name
* @param array $attributes
* @return string
*/
*/
public
static
function
password
(
$name
,
$attributes
=
array
())
{
return
static
::
input
(
'password'
,
$name
,
null
,
$attributes
);
...
...
@@ -266,7 +266,7 @@ class Form {
* @param string $value
* @param array $attributes
* @return string
*/
*/
public
static
function
search
(
$name
,
$value
=
null
,
$attributes
=
array
())
{
return
static
::
input
(
'search'
,
$name
,
$value
,
$attributes
);
...
...
@@ -279,7 +279,7 @@ class Form {
* @param string $value
* @param array $attributes
* @return string
*/
*/
public
static
function
email
(
$name
,
$value
=
null
,
$attributes
=
array
())
{
return
static
::
input
(
'email'
,
$name
,
$value
,
$attributes
);
...
...
@@ -305,7 +305,7 @@ class Form {
* @param string $value
* @param array $attributes
* @return string
*/
*/
public
static
function
url
(
$name
,
$value
=
null
,
$attributes
=
array
())
{
return
static
::
input
(
'url'
,
$name
,
$value
,
$attributes
);
...
...
@@ -318,12 +318,12 @@ class Form {
* @param string $value
* @param array $attributes
* @return string
*/
*/
public
static
function
number
(
$name
,
$value
=
null
,
$attributes
=
array
())
{
return
static
::
input
(
'number'
,
$name
,
$value
,
$attributes
);
}
/**
* Create a HTML date input element.
*
...
...
@@ -331,7 +331,7 @@ class Form {
* @param string $value
* @param array $attributes
* @return string
*/
*/
public
static
function
date
(
$name
,
$value
=
null
,
$attributes
=
array
())
{
return
static
::
input
(
'date'
,
$name
,
$value
,
$attributes
);
...
...
@@ -343,7 +343,7 @@ class Form {
* @param string $name
* @param array $attributes
* @return string
*/
*/
public
static
function
file
(
$name
,
$attributes
=
array
())
{
return
static
::
input
(
'file'
,
$name
,
null
,
$attributes
);
...
...
@@ -386,18 +386,18 @@ class Form {
* @param string $selected
* @param array $attributes
* @return string
*/
*/
public
static
function
select
(
$name
,
$options
=
array
(),
$selected
=
null
,
$attributes
=
array
())
{
$attributes
[
'id'
]
=
static
::
id
(
$name
,
$attributes
);
$attributes
[
'name'
]
=
$name
;
$html
=
array
();
foreach
(
$options
as
$value
=>
$display
)
{
if
(
is_array
(
$display
))
if
(
is_array
(
$display
))
{
$html
[]
=
static
::
optgroup
(
$display
,
$value
,
$selected
);
}
...
...
@@ -607,12 +607,12 @@ class Form {
*/
public
static
function
__callStatic
(
$method
,
$parameters
)
{
if
(
isset
(
static
::
$macros
[
$method
]))
{
return
call_user_func_array
(
static
::
$macros
[
$method
],
$parameters
);
}
throw
new
\Exception
(
"Method [
$method
] does not exist."
);
if
(
isset
(
static
::
$macros
[
$method
]))
{
return
call_user_func_array
(
static
::
$macros
[
$method
],
$parameters
);
}
throw
new
\Exception
(
"Method [
$method
] does not exist."
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment