Download the PHP package nanson/yii2-messenger without Composer
On this page you can find all versions of the php package nanson/yii2-messenger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package yii2-messenger
Yii2 Messenger
Private messages module for yii2
Installing
The preferred way to install this extension is through Composer.
Migration
Configure module:
Usage
Url for contacts list: /messenger/contacts/
.
Url for messages list: /messenger/contacts/messages/?id={contact_id}
Contacts widget
Display contacts list for user with last message.
Option | Type | Description |
---|---|---|
userId | integer | User ID. Default: \Yii::$app->user->id |
tpl | string | Widget template. Default: create |
options | array | The HTML attributes for the widget wrapper tag. Default: [] |
pageSize | integer | Contacts per page. Default: 10 |
defaultOrder | array | Default contacts order Default: ['last_message_id' => SORT_DESC] |
viewRoute | string | Route to messages. Default: /messenger/contacts/messages |
dataProviderOptions | array | Options for yii\data\ActiveDataProvider . Default: [] |
queryModifier | callable | Function to modify ActiveDataProvider query. Default: null |
skinAsset | string | Skin Asset Bundles class. Default: null |
Messages widget
Display user messages with current contact
Option | Type | Description |
---|---|---|
contactId | integer | Contact ID. |
userId | integer | User ID. Default: \Yii::$app->user->id |
tpl | string | Widget template. Default: messages |
options | array | The HTML attributes for the widget wrapper tag. Default: [] |
pageSize | integer | Messages per page. Default: 10 |
defaultOrder | array | Default contacts order Default: ['created_at' => SORT_DESC] |
dataProviderOptions | array | Options for yii\data\ActiveDataProvider . Default: [] |
queryModifier | callable | Function to modify ActiveDataProvider query. Default: null |
skinAsset | string | Skin Asset Bundles class. Default: null |
Add message widget
Display form to message creation.
Option | Type | Description |
---|---|---|
contactId | integer | Contact ID. |
userId | integer | User ID. Default: \Yii::$app->user->id |
tpl | string | Widget template. Default: create |
options | array | The HTML attributes for the widget wrapper tag. Default: [] |
formOptions | array | The HTML attributes for the widget form. Default: [] |
route | string | Route to create message action. Default: /messenger/rest/create |
skinAsset | string | Skin Asset Bundles class. Default: null |
pjaxId | string | Pjax widget Id. If specified, pjax will be reloaded after message creation. Default: null |
fancySelector | string | Fancybox selector. If specified, widget will be rendered as Fancybox. https://github.com/newerton/yii2-fancybox Default: null |
fancyOptions | array | Fancybox widget options. Default: null |
Messages counter widget
Display count unreaded messages for user.
Option | Type | Description |
---|---|---|
route | string | Route to action. Default: /messenger/rest/count |
timeout | integer | Update timout. Default: 30 |
tag | string | Counter html tag. Default: span |
options | array | The HTML attributes for the counter tag. Default: ['class' => 'badge'] |
All versions of yii2-messenger with dependencies
PHP Build Version
Package Version
The package nanson/yii2-messenger contains the following files
Loading the files please wait ....