iserv4u/yii2-pii

This package is abandoned and no longer maintained. No replacement package was suggested.

A Yii2 widget and behavior to show and add content to a sidebar slideout panel.

Installs: 494

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

0.2.6 2018-09-03 18:49 UTC

This package is not auto-updated.

Last update: 2019-05-13 20:15:53 UTC


README

See repository clone on iServ4u GitLab

What is this?

A sidebar panel, using a behavior to add any kind of elements from any object class.

Installation

Via composer:

composer require iserv4u/yii2-pii:*

Configuration

$web = [
    'modules' => [
        'pii' => [
            'class'   => \iserv4u\pii\Module::class,
        ],
    ]
];

Migrations

@iserv4u/pii/migrations

Output the panel

Simply add <?= \iserv4u\pii\widgets\PanelWidget::widget(); ?> in your layout or view.

Use the behavior

Add / register a item / element to the panel in any yii2 object

public function behaviors()
{
    return [
        'editor-panel' => [
            'class' => PanelBehavior::class,
            'group' => self::class,
            'item'  => [
                'view' => $this->render('@VIEW_PATH_ALIAS', ['param' => $value]),
                'options' => [
                    'class' => 'css-class'
                ]
            ]
        ]
    ];
}

or

$this->attachBehavior(
    'editor-panel' => [
        'class' => PanelBehavior::class,
        'group' => self::class,
        'item'  => [
            'view' => $this->render('@VIEW_PATH_ALIAS', ['param' => $value]),
            'options' => [
                'class' => 'css-class'
            ]
        ]
    ]
);

RBAC

Available Roles:

  • Pii-Editor

References

slideout.js - A touch slideout navigation menu for your mobile web apps.