iserv4u / yii2-pii
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
Requires
- bower-asset/slideout.js: ^1.0
- yiisoft/yii2: 2.0.*
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.