Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
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
PSDI Army
yii2
Commits
9a4f4f85
Commit
9a4f4f85
authored
Mar 18, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
3b610926
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
0 deletions
+50
-0
index.php
tests/web/app/index.php
+6
-0
main.php
tests/web/app/protected/config/main.php
+4
-0
SiteController.php
tests/web/app/protected/controllers/SiteController.php
+31
-0
index.php
tests/web/app/protected/views/site/index.php
+9
-0
No files found.
tests/web/app/index.php
0 → 100644
View file @
9a4f4f85
<?php
require
(
__DIR__
.
'/../../../framework/yii.php'
);
$application
=
new
yii\web\Application
(
'test'
,
__DIR__
.
'/protected'
);
$application
->
run
();
tests/web/app/protected/config/main.php
0 → 100644
View file @
9a4f4f85
<?php
return
array
();
\ No newline at end of file
tests/web/app/protected/controllers/SiteController.php
0 → 100644
View file @
9a4f4f85
<?php
use
yii\util\Html
;
class
DefaultController
extends
\yii\web\Controller
{
public
function
actionIndex
()
{
echo
'hello world'
;
}
public
function
actionForm
()
{
echo
Html
::
beginForm
();
echo
Html
::
checkboxList
(
'test'
,
array
(
'value 1'
=>
'item 1'
,
'value 2'
=>
'item 2'
,
'value 3'
=>
'item 3'
,
),
isset
(
$_POST
[
'test'
])
?
$_POST
[
'test'
]
:
null
,
function
(
$index
,
$label
,
$name
,
$value
,
$checked
)
{
return
Html
::
label
(
$label
.
' '
.
Html
::
checkbox
(
$name
,
$value
,
$checked
),
null
,
array
(
'class'
=>
'inline checkbox'
)
);
});
echo
Html
::
submitButton
();
echo
Html
::
endForm
();
print_r
(
$_POST
);
}
}
\ No newline at end of file
tests/web/app/protected/views/site/index.php
0 → 100644
View file @
9a4f4f85
<?php
/**
* Created by JetBrains PhpStorm.
* User: qiang
* Date: 3/16/13
* Time: 10:41 AM
* To change this template use File | Settings | File Templates.
*/
\ No newline at end of file
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