2017 © Pedro Peláez
 

yii2-extension yii2-behaviors

image

carono/yii2-behaviors

  • Wednesday, June 27, 2018
  • by carono
  • Repository
  • 1 Watchers
  • 0 Stars
  • 299 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 12 Versions
  • 21 % Grown

The README.md

 public function behaviors()
    {
        return [
            'urls' => [
                'class' => UrlBehavior::class,
                'rules' => [
                    [
                        'view-content',
                        'url' => function ($model, $params) {
                            return $model->is_main ? ['/'] : ['/menu/view'] + $params;
                        },
                        'params' => ['id']
                    ],
                    ['view', 'url' => ['/admin/menu/view'], 'params' => ['id'], 'role' => ['root']],
                ]
            ]
        ];
    }

function getUrl($action, $asString = false), (*1)

$url = $model->getUrl('view'); // array ['/admin/menu/view','id'=>1], (*2)

The Versions

27/06 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

27/06 2018

0.3.2

0.3.2.0

  Sources   Download

MIT

The Requires

 

29/05 2018

0.3.1

0.3.1.0

  Sources   Download

The Requires

 

23/02 2018

0.3.0

0.3.0.0

  Sources   Download

The Requires

 

24/01 2018

0.2.4

0.2.4.0

  Sources   Download

The Requires

 

11/11 2017

0.2.3

0.2.3.0

  Sources   Download

The Requires

 

10/10 2017

0.2.2

0.2.2.0

  Sources   Download

The Requires

 

27/09 2017

0.2.1

0.2.1.0

  Sources   Download

The Requires

 

26/09 2017

0.2.0

0.2.0.0

  Sources   Download

The Requires

 

28/08 2017

0.1.2

0.1.2.0

  Sources   Download

The Requires

 

18/08 2017

0.1.1

0.1.1.0

  Sources   Download

The Requires

 

11/07 2017

0.1.0

0.1.0.0

  Sources   Download

The Requires