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
8141fc19
Commit
8141fc19
authored
Oct 24, 2013
by
Luciano Baraglia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More on short echo tags [skip ci]
parent
0c1477c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
action.php
framework/yii/gii/generators/form/templates/action.php
+1
-1
form.php
framework/yii/gii/generators/form/templates/form.php
+4
-4
view.php
framework/yii/gii/generators/module/templates/view.php
+5
-5
No files found.
framework/yii/gii/generators/form/templates/action.php
View file @
8141fc19
...
...
@@ -14,7 +14,7 @@ echo "<?php\n";
public function action
<?=
Inflector
::
id2camel
(
trim
(
basename
(
$generator
->
viewName
),
'_'
))
?>
()
{
$model = new
<?=
$generator
->
modelClass
?><?=
empty
(
$generator
->
scenarioName
)
?
''
:
"(['scenario' => '
{
$generator
->
scenarioName
}
'])"
?>
;
$model = new
<?=
$generator
->
modelClass
?><?=
empty
(
$generator
->
scenarioName
)
?
""
:
"(['scenario' => '
{
$generator
->
scenarioName
}
'])"
?>
;
if ($model->load($_POST)) {
if($model->validate()) {
...
...
framework/yii/gii/generators/form/templates/form.php
View file @
8141fc19
...
...
@@ -21,15 +21,15 @@ use yii\widgets\ActiveForm;
<div
class=
"
<?=
str_replace
(
'/'
,
'-'
,
trim
(
$generator
->
viewName
,
'_'
))
?>
"
>
<?=
'<?php'
?>
$form = ActiveForm::begin(); ?>
<?=
"<?php "
?>
$form = ActiveForm::begin(); ?>
<?php
foreach
(
$generator
->
getModelAttributes
()
as
$attribute
)
:
?>
<?=
'<?php'
?>
echo $form->field($model, '
<?=
$attribute
?>
');
?>
<?=
"<?= "
?>
$form->field($model, '
<?=
$attribute
?>
')
?>
<?php
endforeach
;
?>
<div
class=
"form-group"
>
<?=
'<?php'
?>
echo Html::submitButton('Submit', ['class' => 'btn btn-primary']);
?>
<?=
"<?= "
?>
Html::submitButton('Submit', ['class' => 'btn btn-primary'])
?>
</div>
<?=
'<?php'
?>
ActiveForm::end(); ?>
<?=
"<?php "
?>
ActiveForm::end(); ?>
</div>
<!--
<?=
str_replace
(
'/'
,
'-'
,
trim
(
$generator
->
viewName
,
'-'
))
?>
-->
framework/yii/gii/generators/module/templates/view.php
View file @
8141fc19
...
...
@@ -5,14 +5,14 @@
*/
?>
<div
class=
"
<?=
$generator
->
moduleID
.
'-default-index'
?>
"
>
<h1>
<?=
"<?
php"
?>
echo $this->context->action->uniqueId;
?>
</h1>
<h1>
<?=
"<?
"
?>
$this->context->action->uniqueId
?>
</h1>
<p>
This is the view content for action "
<?=
"<?
php"
?>
echo $this->context->action->id;
?>".
The action belongs to the controller "
<?=
"<?
php"
?>
echo get_class($this->context);
?>"
in the "
<?=
"<?
php"
?>
echo $this->context->module->id;
?>" module.
This is the view content for action "
<?=
"<?
= "
?>
$this->context->action->id
?>".
The action belongs to the controller "
<?=
"<?
= "
?>
get_class($this->context)
?>"
in the "
<?=
"<?
= "
?>
$this->context->module->id
?>" module.
</p>
<p>
You may customize this page by editing the following file:
<br>
<code>
<?=
"<?
php"
?>
echo __FILE__;
?>
</code>
<code>
<?=
"<?
= "
?>
__FILE__
?>
</code>
</p>
</div>
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