Phosphorum\Models\PostsReplies::afterSave PHP Method

afterSave() public method

public afterSave ( )
    public function afterSave()
    {
        $this->clearCache();
        $history = new PostsRepliesHistory();
        $history->posts_replies_id = $this->id;
        $usersId = $this->getDI()->getSession()->get('identity');
        $history->users_id = $usersId ? $usersId : $this->users_id;
        $history->content = $this->content;
        $history->save();
    }