Learn YII2 Framework (iv) extension from scratch Yii2-kartikgii,yii2yii2-kartikgii
Today found a useful plugin yii2-kartikgii. It is based on a series of plug-in kartik-v expansion.
Plugin Introduction
The main function of this plugin is to help you generate Kartik-gird when using the GII to generate code curd. There is no need to manually add Kartik-gird every time you generate code with the default GII tool, which is exactly what I want. Quickly generate Kartik-grid.
Before you learn this plugin you may need to know the following Yii2-gird plugin: Portal
Plug-in installation and configuration
Look directly at the plugin URL:
http://www.yiiframework.com/extension/yii2-kartikgii/
Plugin trial
There is just one project that uses this plugin and tries out the code generated by the plugin.
The resulting page of the visit is as follows:
It is worth mentioning that kartikgii the Yii2-gird basically completely compatible with the down.
This includes a very functional "floating Header", a feature that, when you browse multiple data, the field name of the table can always be displayed above the browser.
is similar to the fixed header in Excel.
Bugs and Fixes
In the process of using the plug-in, generate complete code, access to Crud index.php, will be error.
After catching the code and discovering a small bug, the author wants to comment out a piece of code in the Crud method template that comes with the framework. However, the annotation symbol used is "//",
The generated code only commented on one line, and several other lines were not commented out, so an error was made. I manually modified the Generate code template.
Found a bug, the first time to notify the plugin author, fixed the bug. Can now be used normally.
Custom templates
In fact, after installing the plugin, you can modify these files in the plugin file
By modifying these template files, you can customize the generated code. Pre-backup is recommended.
http://www.bkjia.com/PHPjc/866657.html www.bkjia.com true http://www.bkjia.com/PHPjc/866657.html techarticle Learn from scratch YII2 Framework (iv) Extension yii2-kartikgii,yii2yii2-kartikgii today found a good plug-in yii2-kartikgii. It is based on a series of plug-in kartik-v expansion. Plug ...