Skip to content

Vlsirko/yii2-application-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-application-builder

*This is beta version, and may contain some bugs

This extention allows you to generate tables, models, CRUD's and modules via JSON file. This is same with gii code generator, but you don't need to do this manually. You can fill json file as you need and generate code via one command in console

Requirements:

  • Yii2 framework (basic or advanced template)
  • Yii2 gii module

Instalation via composer:

  • Add to yours composer.json in "require-dev" field:
	"Vlsirko/yii2-application-builder" : "dev-master"
  • Add to yours composer.json in "repositories" field:
{
	"url" : "https://github.com/Vlsirko/yii2-application-builder.git",
	"type" : "git"
}
  • Run *./composer.phar update* in shell
  • Change your configuration file:

For advanced template

Open console/config/main-local.php file and in field "bootstrap" add "app_builder":

	'bootstrap' => ['log', 'app_builder']

Add to "modules" field installed module:

    'modules' => [
		'app_builder' => [
			'class' => 'AppBuilder\Module',
		]
	]

For basic template

Open config/console.php file and in field "bootstrap" add "app_builder":

	'bootstrap' => ['log', 'app_builder']

Add to "modules" field installed module:

   'modules' => [
		'app_builder' => 'AppBuilder\Module'
    ],

Usage:

Generating application:

  1. Create app_structure.json file and put it into your app config directory
  2. Fill this file like in sample
  3. Run yii2 console app $./yii app_builder generate:

Rollback changes:

Run next command in yii2 base directory $ ./yii app_builder rollback

Setting your own code generators:

If you need to redefine standart code generators, you must follow by next steps:

  1. Create app_dependencies.json file in console config directory;
  2. FIll this file like this sample;

WARNING! Your own class must be an instance of yii\gii\Generator

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages