|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Apps\Controller\Api; |
|
4
|
|
|
|
|
5
|
|
|
use Extend\Core\Arch\ApiController; |
|
6
|
|
|
|
|
7
|
|
|
/** |
|
8
|
|
|
* Class Profile. Api controller provide ajax/json for user profile features |
|
9
|
|
|
* @package Apps\Controller\Api |
|
10
|
|
|
*/ |
|
11
|
|
|
class Profile extends ApiController |
|
12
|
|
|
{ |
|
13
|
|
|
const ITEM_PER_PAGE = 10; |
|
14
|
|
|
const ANSWER_DELAY = 60; // in seconds |
|
15
|
|
|
|
|
16
|
|
|
const MSG_USER_LIST = 10; |
|
17
|
|
|
const MSG_TEXT_LIST = 20; |
|
18
|
|
|
|
|
19
|
|
|
// include actions from traits |
|
20
|
|
|
use Profile\ActionWallAnswerCount { |
|
21
|
|
|
wallAnswerCount as actionWallanswercount; |
|
22
|
|
|
} |
|
23
|
|
|
|
|
24
|
|
|
use Profile\ActionShowWallAnswers { |
|
25
|
|
|
showWallAnswers as actionShowwallanswers; |
|
26
|
|
|
} |
|
27
|
|
|
|
|
28
|
|
|
use Profile\ActionSendWallAnswer { |
|
29
|
|
|
sendWallAnswer as actionSendwallanswer; |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
use Profile\ActionDeleteAnswerOwner { |
|
33
|
|
|
deleteAnswerOwner as actionDeleteanswerowner; |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
use Profile\ActionListMessageDialog { |
|
37
|
|
|
listMessageDialog as actionListmessagedialog; |
|
38
|
|
|
} |
|
39
|
|
|
|
|
40
|
|
|
use Profile\ActionNotifications { |
|
41
|
|
|
notifications as actionNotifications; |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
use Profile\ActionMessageList { |
|
45
|
|
|
messageList as actionMessageList; |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
use Profile\ActionMessageSend { |
|
49
|
|
|
messageSend as actionMessagesend; |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
use Profile\ActionChangeRating { |
|
53
|
|
|
changeRating as actionChangerating; |
|
54
|
|
|
} |
|
55
|
|
|
} |
|
56
|
|
|
|