Yii 1.1: e-xgen

extjs crud generator
16 followers

overview of the extension

ExGen is gii Extended, an extjs code generator for Yii PHP framework.

ExGen is inspired and based on giix by mentel, web app generator by derelict and gii-template-collection (gtc), by Herbert Maschke (thyseus).

ExGen is free software and is dual-licensed under the terms of the new BSD License and under the terms of GNU GPL v3. See the LICENSE file

requirements

requirements of using this extension extjs 3.4.0 and Yii 1.1.8 or above

Usage

extract to extension folder copy webapp and extjs in extension folder to theme folder copy js folder in extension folder to base path

configure config/main php

'modules'=>array(
        // uncomment the following to enable the Gii tool
        ...
        'gii'=>array(
            'class'=>'system.gii.GiiModule',
            'password'=>'you password',
            // If removed, Gii defaults to localhost only. Edit carefully to taste.
            'ipFilters'=>array('127.0.0.1','::1'),
                        'generatorPaths'=>array(
                            'ext.giix-core', // giix generators
            ),
    ...
    ),

create module first before using the generator, after creating the module, add your newly created module to config->main.php before running giixcrudjs <-important generate model using giix model under that module generate controller using giixcrudjs under that module js automaticaly created on basepath js/view

final structure

project name
--assets
--css
--images
--js
----ext340
----view
--protected
----modules
------your modules
...
--themes
----classic
----extjs
----webapp

configure theme to use 'theme'=>'webapp' or 'theme'=>'extjs',

configure component

// autoloading model and component classes
    'import'=>array(
        'application.models.*',
        'application.components.*',
                'ext.giix-components.*',
        ...
    ),

add generated controler to site/tree action, with pattern 'jun.' + model name + 'Grid', automatic site/tree action will be added in the next release

$data = "[{
                            text:'Entri Mims',
                            expanded: true,
                            children:[{
                                text: 'Mims',
                                id: 'jun.MimsGrid',
                                leaf: true
                            },{
                                text: 'your model label',
                                id: 'jun.{model name}Grid',
                                leaf: true
                            },
...
}]";

Total 1 comment

#5703 report it
hening malam at 2011/11/04 03:28am
extjs framework not included

download extjs 3.4.0 framework from sencha.com and put under js/ext340 folder

Leave a comment

Please to leave your comment.

Create extension