mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-17 14:57:23 +08:00
added ability to create own "yiic create" templates
This commit is contained in:
20
framework/console/create/config.php
Normal file
20
framework/console/create/config.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/** @var $controller \yii\console\controllers\CreateController */
|
||||
$controller = $this;
|
||||
|
||||
return array(
|
||||
'default' => array(
|
||||
'index.php' => array(
|
||||
'handler' => function($source) use ($controller) {
|
||||
return $controller->replaceRelativePath($source, realpath(YII_PATH.'/yii.php'), 'yii');
|
||||
},
|
||||
'permissions' => 0777,
|
||||
),
|
||||
'assets' => array(
|
||||
'permissions' => 0777,
|
||||
),
|
||||
'protected/runtime' => array(
|
||||
'permissions' => 0755,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -1 +1,8 @@
|
||||
<?php
|
||||
|
||||
// change the following paths if necessary
|
||||
$yii=__DIR__.'/../framework/yii.php';
|
||||
$config=__DIR__.'/protected/config/main.php';
|
||||
|
||||
require_once($yii);
|
||||
Yii::createWebApplication($config)->run();
|
||||
|
||||
Reference in New Issue
Block a user