2017 © Pedro PelĂĄez
 

yii2-extension yii2-prototype-module

Backend UI for static files

image

dmstr/yii2-prototype-module

Backend UI for static files

  • Thursday, June 14, 2018
  • by schmunk
  • Repository
  • 5 Watchers
  • 5 Stars
  • 12,965 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 59 Versions
  • 7 % Grown

The README.md

Yii2 Prototype Module

Latest Stable Version Total Downloads License, (*1)

Twig, LESS and HTML Content prototyping module for Yii 2.0 Framework, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist dmstr/yii2-prototype-module "*"

or add, (*5)

"dmstr/yii2-prototype-module": "*"

to the require section of your composer.json file., (*6)

Requirements

  • configured Twig view renderer in application (since 0.5.0-rc6)

Usage

Prototype command:

Configuration

In your console config add:, (*7)

'controllerMap' => [
    'prototype' => 'dmstr\modules\prototype\commands'
]
Commands:
  • prototype/export-html
  • prototype/export-less
  • prototype/export-twig

Each of these commands exports either html, less or twig as a file on a given file path (via --exportPath flag) default is @runtime/exports, (*8)

Note: To escape file names you can use the --escapeFileNames flag, (*9)

  • prototype/export-asset-bundle

Exports less files and an asset bunde to a given export path (via --exportPath flag) default is @runtime/exports, (*10)

Note:, (*11)

1.) You will be prompted to choose a namespace and to select less files which should be added to the asset bundle 2.) The defined main less file will be automatical have default yes in confirmation, (*12)

--> if you run this command on non interactive mode (--interactive=0), main less file will be added to the asset bundle and the namespace will be set to app\assets, (*13)

Twig example

{{ use ('hrzg/moxiecode/moxiemanager/widgets') }}

{{ browse_button_widget( {"tagName": "a"} ) }}

Cache trigger time

\Yii::$app->cache->get('prototype.less.changed_at');

Testing

docker-compose up -d

docker-compose run phpfpm codecept run

CRUDS

:bangbang: Do no regenerate CRUDs for html, (*14)

$ yii batch \
    --tables=app_twig \
    --modelNamespace=dmstr\\modules\\prototype\\models \
    --modelQueryNamespace=dmstr\\modules\\prototype\\models\\query \
    --crudSearchModelNamespace=dmstr\\modules\\prototype\\models\\query \
    --crudControllerNamespace=dmstr\\modules\\prototype\\controllers \
    --crudViewPath=@dmstr/modules/prototype/views \

The Versions

04/09 2017

dev-feature/view-render-clone

dev-feature/view-render-clone

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

04/09 2017
11/11 2016

0.4.3-rc1

0.4.3.0-RC1

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

10/11 2016

0.4.3-beta4

0.4.3.0-beta4

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

21/10 2016

0.4.3-beta3

0.4.3.0-beta3

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

13/10 2016

0.4.3-beta2

0.4.3.0-beta2

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

05/10 2016

dev-feature/updated-config

dev-feature/updated-config

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

05/10 2016

0.4.3-beta1

0.4.3.0-beta1

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

18/09 2016
15/09 2016
19/07 2016

dev-feature/update-query-param

dev-feature/update-query-param

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

19/07 2016
19/07 2016

0.4.0-beta1

0.4.0.0-beta1

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

19/07 2016
13/07 2016
13/07 2016

dev-feature/backend-templates

dev-feature/backend-templates

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

13/07 2016
13/07 2016
13/07 2016
13/07 2016

dev-feature/update-controller

dev-feature/update-controller

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

30/06 2016
25/05 2016
25/05 2016
19/05 2016
18/05 2016
16/05 2016
13/05 2016
11/05 2016
11/05 2016

0.2.0

0.2.0.0

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

04/05 2016

0.1.0

0.1.0.0

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

06/03 2016

dev-feature/tests

dev-feature/tests

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

06/03 2016

0.0.3

0.0.3.0

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

04/03 2016

0.0.2

0.0.2.0

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2

04/03 2016

0.0.1

0.0.1.0

Backend UI for static files

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2