2017 © Pedro Peláez
 

yii2-extension yii2-gii-jade

Jade Gii Generator for Yii2

image

jacmoe/yii2-gii-jade

Jade Gii Generator for Yii2

  • Tuesday, February 16, 2016
  • by jacmoe
  • Repository
  • 1 Watchers
  • 0 Stars
  • 83 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Jade Gii Generator for Yii2

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Works well with Yii2 Tale Jade, the Tale Jade for PHP integration for the Yii2 framework., (*2)

Installation with Composer

Installation is recommended to be done via composer by running:, (*3)

composer require jacmoe/yii2-gii-jade "*"

Configuration

Add it to your configuration (frontend/config/main-local.php and/or backend/config/main-local.php for the advanced template)., (*4)

Add the generator

if (!YII_ENV_TEST) {
  // configuration adjustments for 'dev' environment
  $config['bootstrap'][] = 'debug';
  $config['modules']['debug'] = 'yii\debug\Module';

  $config['bootstrap'][] = 'gii';
  $config['modules']['gii'] = [
    'class' => 'yii\gii\Module',
    'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.178.20'],
    'generators' => [
      'jadecrud' => [
        'class' => 'jacmoe\giijade\crud\Generator',
        'templates' => [
          'myCrud' => '@jacmoe/giijade/crud/default',
        ]
      ]
    ],
  ];
}

Set defaultExtension

'components' => [
    ...
    ],
    'view' => [
        'defaultExtension' => 'jade',
    ...

Alternatively, if you don't want to set the default extension for the views, then you need to explicitly set the extension in your views/controllers., (*5)

For instance:, (*6)

public function actionAbout()
{
    return $this->render('about.jade');
}
...
$this->render('_form.jade', ['model' => $model,])

Known Bugs

When the i18n option is turned on for the generator, there will be an error in update.jade that looks like this:, (*7)

-$view->title = Yii::t('app', 'Update {modelClass}: ', [
    'modelClass' => 'User',
]) . ' ' . $model->id

You need to remove the line breaks, like this:, (*8)

-$view->title = Yii::t('app', 'Update {modelClass}: ', ['modelClass' => 'User',]) . ' ' . $model->id

License

The Jade Gii Generator for Yii2 is released under the MIT license., (*9)

The Versions

16/02 2016

dev-master

9999999-dev

Jade Gii Generator for Yii2

  Sources   Download

MIT

The Requires

 

yii2 gii jade

10/11 2015

0.2.0

0.2.0.0

Jade Gii Generator for Yii2

  Sources   Download

MIT

The Requires

 

yii2 gii jade

09/11 2015

0.1.8

0.1.8.0

Jade Gii Generator for Yii2

  Sources   Download

MIT

The Requires

 

yii2 gii jade

06/11 2015

0.1.5

0.1.5.0

Jade Gii Generator for Yii2

  Sources   Download

MIT

The Requires

 

yii2 gii jade

06/11 2015

0.1.2

0.1.2.0

Jade Gii Generator for Yii2

  Sources   Download

MIT

The Requires

 

yii2 gii jade

06/11 2015

0.1.1

0.1.1.0

Jade Gii Generator for Yii2

  Sources   Download

MIT

The Requires

 

yii2 gii jade

06/11 2015

0.1.0

0.1.0.0

Jade Gii Generator for Yii2

  Sources   Download

MIT

The Requires

 

yii2 gii jade