Trait lispa\amos\chat\controllers\ControllerTrait
Implemented by | lispa\amos\chat\controllers\DefaultController |
---|
Class ControllerTrait
Public Methods
Method Details
public lispa\amos\chat\DataProvider actionConversations ( ) |
public array|boolean actionCreateMessage ( $contactId ) | ||
$contactId | ||
throws | yii\web\ForbiddenHttpException |
---|
public array actionDeleteConversation ( $contactId ) | ||
$contactId |
public void actionDeleteMessage ( $id ) | ||
$id | ||
throws | yii\base\NotSupportedException |
---|
public array actionMarkConversationAsRead ( $contactId ) | ||
$contactId |
public array actionMarkConversationAsUnread ( $contactId ) | ||
$contactId |
public lispa\amos\chat\DataProvider actionMessages ( $contactId ) | ||
$contactId |
public array|boolean actionSendMessage ( $contactId ) | ||
$contactId | ||
throws | yii\web\ForbiddenHttpException |
---|
public yii\db\ActiveQuery actionUserContacts ( ) |
This method is invoked right after an action is executed.
The method will trigger the \lispa\amos\chat\controllers\EVENT_AFTER_ACTION event. The return value of the method will be used as the action return value.
If you override this method, your code should look like the following:
public function afterAction($action, $result)
{
$result = parent::afterAction($action, $result);
// your custom code here
return $result;
}
public mixed afterAction ( $action, $result ) | ||
$action | yii\base\Action | The action just executed. |
$result | mixed | The action return result. |
return | mixed | The processed action result. |
---|
public array behaviors ( ) |
public string getConversationClass ( ) |
public string getMessageClass ( ) |
public yii\web\IdentityInterface getUser ( ) |