2017 © Pedro Peláez
 

yii2-extension yii2-js-urlmanager

Yii2 javascript URL manager

image

dmirogin/yii2-js-urlmanager

Yii2 javascript URL manager

  • Saturday, July 14, 2018
  • by dmirogin
  • Repository
  • 4 Watchers
  • 54 Stars
  • 2,142 Installations
  • TypeScript
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 2 Open issues
  • 5 Versions
  • 22 % Grown

The README.md

Latest Stable Version License, (*1)

Yii2 js UrlManager

That extension provide a way to create urls from your frontend part., (*2)

Instalation

composer require dmirogin/yii2-js-urlmanager
  1. How to use
  2. PHP options
  3. Contributing
  4. Roadmap

How to use

  1. Add component to your application configuration php 'jsUrlManager' => [ 'class' => \dmirogin\js\urlmanager\JsUrlManager::class, ],
  2. Add component to bootstrap php 'bootstrap' => ['jsUrlManager'],
  3. Now you can use window.UrlManager or just UrlManager in your frontend part js UrlManager.createUrl('foo/bar', {id: 10})

if you want to change assets position, use this, (*3)

'assetManager' => [
    'bundles' => [
        \dmirogin\js\urlmanager\JsUrlManagerAsset::class => [
            'jsOptions' => [
                'position' => \yii\web\View::POS_END,
            ],
        ],
    ],
],

PHP options

configurationStringPosition - integer

Default value - \yii\web\View::POS_HEAD, (*4)

The location to register configuration Frontend UrlManager string, (*5)

'jsUrlManager' => [
    'class' => \dmirogin\js\urlmanager\JsUrlManager::class,
    'configurationStringPosition' => \yii\web\View::POS_END,
],

configureThroughVariable - boolean

Default value - false, (*6)

Setting configuration through document variable urlManagerConfiguration, (*7)

'jsUrlManager' => [
    'class' => \dmirogin\js\urlmanager\JsUrlManager::class,
    'configureThroughVariable' => true,
],

Contributing

  1. Clone project
  2. Write code
  3. Test npm run test ./vendor/bin/phpunit
  4. Build js npm run build

Roadmap

  • Disable or enable including rules in frontend
  • Creating absolute urls

The Versions

14/07 2018

dev-master

9999999-dev

Yii2 javascript URL manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Dorogin

yii2 assets urlmanager

31/01 2018

1.2.0

1.2.0.0

Yii2 javascript URL manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Dorogin

yii2 assets urlmanager

17/07 2017

1.1.0

1.1.0.0

Yii2 javascript URL manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Dorogin

yii2 assets urlmanager

03/07 2017

1.0.1

1.0.1.0

Yii2 javascript URL manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Dorogin

yii2 assets urlmanager

02/07 2017

1.0.0

1.0.0.0

Yii2 javascript URL manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Dorogin

yii2 assets urlmanager