Browse Source

create command template cleanup

tags/2.0.0-beta
Alexander Makarov 12 years ago
parent
commit
e5be686849
  1. 10
      framework/console/create/default/index.php
  2. 16
      framework/console/create/default/protected/config/main.php
  3. 15
      framework/console/create/default/protected/controllers/SiteController.php
  4. 16
      framework/console/create/default/protected/views/layouts/main.php
  5. 1
      framework/console/create/default/protected/views/site/index.php

10
framework/console/create/default/index.php

@ -1,10 +0,0 @@
<?php
define('YII_DEBUG', true);
$yii = __DIR__.'/../framework/yii.php';
require $yii;
$config = require dirname(__DIR__).'/protected/config/main.php';
$basePath = dirname(__DIR__).'/protected';
$app = new \yii\web\Application('webapp', $basePath, $config);
$app->run();

16
framework/console/create/default/protected/config/main.php

@ -1,16 +0,0 @@
<?php
return array(
'name' => 'My Web Application',
'components' => array(
// uncomment the following to use a MySQL database
/*
'db' => array(
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=testdrive',
'username' => 'root',
'password' => '',
),
*/
),
);

15
framework/console/create/default/protected/controllers/SiteController.php

@ -1,15 +0,0 @@
<?php
use \yii\web\Controller;
/**
* SiteController
*/
class SiteController extends Controller
{
public function actionIndex()
{
echo $this->render('index', array(
'name' => 'Qiang',
));
}
}

16
framework/console/create/default/protected/views/layouts/main.php

@ -1,16 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title><?php echo $this->context->pageTitle?></title>
</head>
<body>
<h1><?php echo $this->context->pageTitle?></h1>
<div class="content">
<?php echo $content?>
</div>
<div class="footer">
<?php echo \Yii::powered()?>
</div>
</body>
</html>

1
framework/console/create/default/protected/views/site/index.php

@ -1 +0,0 @@
Hello, <?php echo $name?>!
Loading…
Cancel
Save