From 8141fc19fb145165a35ebd5d4ebaa0a013997e9c Mon Sep 17 00:00:00 2001 From: Luciano Baraglia Date: Thu, 24 Oct 2013 02:33:02 -0300 Subject: [PATCH 1/2] More on short echo tags [skip ci] --- framework/yii/gii/generators/form/templates/action.php | 2 +- framework/yii/gii/generators/form/templates/form.php | 8 ++++---- framework/yii/gii/generators/module/templates/view.php | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/framework/yii/gii/generators/form/templates/action.php b/framework/yii/gii/generators/form/templates/action.php index 6b084f4..7e2f876 100644 --- a/framework/yii/gii/generators/form/templates/action.php +++ b/framework/yii/gii/generators/form/templates/action.php @@ -14,7 +14,7 @@ echo "viewName), '_')) ?>() { - $model = new modelClass ?>scenarioName) ? '' : "(['scenario' => '{$generator->scenarioName}'])" ?>; + $model = new modelClass ?>scenarioName) ? "" : "(['scenario' => '{$generator->scenarioName}'])" ?>; if ($model->load($_POST)) { if($model->validate()) { diff --git a/framework/yii/gii/generators/form/templates/form.php b/framework/yii/gii/generators/form/templates/form.php index a448687..12c2ac4 100644 --- a/framework/yii/gii/generators/form/templates/form.php +++ b/framework/yii/gii/generators/form/templates/form.php @@ -21,15 +21,15 @@ use yii\widgets\ActiveForm;
- $form = ActiveForm::begin(); ?> + $form = ActiveForm::begin(); ?> getModelAttributes() as $attribute): ?> - echo $form->field($model, ''); ?> + $form->field($model, '') ?>
- echo Html::submitButton('Submit', ['class' => 'btn btn-primary']); ?> + Html::submitButton('Submit', ['class' => 'btn btn-primary']) ?>
- ActiveForm::end(); ?> + ActiveForm::end(); ?>
diff --git a/framework/yii/gii/generators/module/templates/view.php b/framework/yii/gii/generators/module/templates/view.php index 311134d..80dd6b5 100644 --- a/framework/yii/gii/generators/module/templates/view.php +++ b/framework/yii/gii/generators/module/templates/view.php @@ -5,14 +5,14 @@ */ ?>
-

echo $this->context->action->uniqueId; ?>

+

$this->context->action->uniqueId ?>

- This is the view content for action " echo $this->context->action->id; ?>". - The action belongs to the controller " echo get_class($this->context); ?>" - in the " 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.

You may customize this page by editing the following file:
- echo __FILE__; ?> + __FILE__ ?>

From 757603220ac6501e9c4ffd2479e97f17297913a5 Mon Sep 17 00:00:00 2001 From: Luciano Baraglia Date: Thu, 24 Oct 2013 02:38:45 -0300 Subject: [PATCH 2/2] More on short echo tags [skip ci] --- framework/yii/gii/generators/module/templates/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/gii/generators/module/templates/view.php b/framework/yii/gii/generators/module/templates/view.php index 80dd6b5..41e8bbc 100644 --- a/framework/yii/gii/generators/module/templates/view.php +++ b/framework/yii/gii/generators/module/templates/view.php @@ -5,7 +5,7 @@ */ ?>
-

$this->context->action->uniqueId ?>

+

$this->context->action->uniqueId ?>

This is the view content for action "$this->context->action->id ?>". The action belongs to the controller "get_class($this->context) ?>"