Trait lispa\amos\chat\controllers\ControllerTrait

Implemented bylispa\amos\chat\controllers\DefaultController

Class ControllerTrait

Method Details

actionConversations() public method

public lispa\amos\chat\DataProvider actionConversations ( )
actionCreateMessage() public method

public array|boolean actionCreateMessage ( $contactId )
throws yii\web\ForbiddenHttpException
actionDeleteConversation() public method

public array actionDeleteConversation ( $contactId )
actionDeleteMessage() public method

public void actionDeleteMessage ( $id )
throws yii\base\NotSupportedException
actionMarkConversationAsRead() public method

public array actionMarkConversationAsRead ( $contactId )
actionMarkConversationAsUnread() public method

public array actionMarkConversationAsUnread ( $contactId )
actionMessages() public method

public lispa\amos\chat\DataProvider actionMessages ( $contactId )
actionSendMessage() public method

public array|boolean actionSendMessage ( $contactId )
throws yii\web\ForbiddenHttpException
actionUserContacts() public method

public yii\db\ActiveQuery actionUserContacts ( )
afterAction() public method

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.

behaviors() public method

public array behaviors ( )
getConversationClass() public method

public string getConversationClass ( )
getMessageClass() public method

public string getMessageClass ( )
getUser() public method

public yii\web\IdentityInterface getUser ( )