| Recommend this page to a friend! | 
|  Download | 
| Info | Example |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
| 2024-06-29 (9 months ago)  | Not enough user ratings | Total: 12 | All time:  11,474 This week: 45  | |||||
| Version | License | PHP version | Categories | |||
| yii2-giitwig 1.0 | MIT/X Consortium ... | 5 | PHP 5, Libraries, Code Generation, De... | 
| 
<?php | 
Gii Twig Template Generator (Port default yii2-gii templates) (Without i18N support yet)
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist insolita/yii2-giitwig "*"
or add
"insolita/yii2-giitwig": "*"
to the require section of your composer.json file.
Twig settings
'view'=>[
            'class'=>'yii\web\View',
            'renderers'=>[
                'twig' => [
                    'class' => 'yii\twig\ViewRenderer',
                    'cachePath' => '@runtime/Twig/cache',
                    'options' => [
                        'auto_reload' => true,
                    ],
                    'globals' => ['html' => '\yii\helpers\Html','arhelp'=>'\yii\helpers\ArrayHelper','url'=>'yii\helpers\Url'],
                    'uses' => ['yii\bootstrap'],],
            ]
]
Gii settings
$config['modules']['gii'] = [
        'class'=>'yii\gii\Module',
        'generators' => [
            'twigcrud' => [
                'class' => 'insolita\giitwig\crud\Generator', // generator class
                'templates' => [
                    'twigCrud' => '@insolita/giitwig/crud/default',
                ]
            ]
        ],
    ];
for customize - copy files from @insolita/giitwig/crud/default to any place, customize and add
$config['modules']['gii'] = [
        'class'=>'yii\gii\Module',
        'generators' => [
            'twigcrud' => [
                'class' => 'insolita\giitwig\crud\Generator', // generator class
                'templates' => [
                    'twigCrud' => '@insolita/giitwig/crud/default',
                    'twigcustomCrud' => '@your/path/to/crud/customized',
                ]
            ]
        ],
    ];
|  Files (13) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  crud (2 files, 1 directory) | ||||
|    composer.json | Data | Auxiliary data | ||
|    README.md | Doc. | Documentation | ||
|  Files (13) | / | crud | 
| File | Role | Description | ||
|---|---|---|---|---|
|  default (2 files, 1 directory) | ||||
|    form.php | Example | Example script | ||
|  Generator.php | Class | Class source | ||
|  Files (13) | / | crud | / | default | 
| File | Role | Description | ||
|---|---|---|---|---|
|  views (7 files) | ||||
|    controller.php | Example | Example script | ||
|    search.php | Example | Example script | ||
|  Files (13) | / | crud | / | default | / | views | 
| File | Role | Description | 
|---|---|---|
|    create.php | Example | Example script | 
|    index.php | Example | Example script | 
|    update.php | Example | Example script | 
|    view.php | Example | Example script | 
|    _form.php | Example | Example script | 
|    _listviewitems.php | Example | Example script | 
|    _search.php | Example | Example script | 
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
 | 
 | 
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.
 If you know an application of this package, send a message to the author to add a link here.