Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 15351 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 15351 Rev 16701
Línea 34... Línea 34...
34
use Laminas\Paginator\Adapter\DbSelect;
34
use Laminas\Paginator\Adapter\DbSelect;
35
use Laminas\Paginator\Paginator;
35
use Laminas\Paginator\Paginator;
36
use LeadersLinked\Mapper\UserMapper;
36
use LeadersLinked\Mapper\UserMapper;
37
use LeadersLinked\Library\Functions;
37
use LeadersLinked\Library\Functions;
38
use LeadersLinked\Model\Company;
38
use LeadersLinked\Model\Company;
39
use LeadersLinked\Model\UserType;
-
 
Línea 40... Línea 39...
40
 
39
 
41
use LeadersLinked\Mapper\TopicMapper;
40
use LeadersLinked\Mapper\TopicMapper;
42
use LeadersLinked\Model\HighPerformanceTeamsGroupsMembers;
41
use LeadersLinked\Model\HighPerformanceTeamsGroupsMembers;
43
use LeadersLinked\Model\HighPerformanceTeamsGroups;
42
use LeadersLinked\Model\HighPerformanceTeamsGroups;
44
use LeadersLinked\Mapper\HighPerformanceTeamsGroupsMembersMapper;
43
use LeadersLinked\Mapper\HighPerformanceTeamsGroupsMembersMapper;
45
use LeadersLinked\Mapper\HighPerformanceTeamsGroupsMapper;
-
 
-
 
44
use LeadersLinked\Mapper\HighPerformanceTeamsGroupsMapper;
Línea 46... Línea 45...
46
use LeadersLinked\Mapper\UtilMapper;
45
 
47
 
46
 
48
class HighPerformanceTeamsGroupsViewFeedController extends AbstractActionController
47
class HighPerformanceTeamsGroupsViewFeedController extends AbstractActionController
49
{
48
{
Línea 170... Línea 169...
170
            $dataPost = $request->getPost()->toArray();
169
            $dataPost = $request->getPost()->toArray();
171
            $form = new CommentForm();
170
            $form = new CommentForm();
172
            $form->setData($dataPost);
171
            $form->setData($dataPost);
Línea 173... Línea 172...
173
            
172
            
174
            if($form->isValid()) {
-
 
175
                $utilMapper = UtilMapper::getInstance($this->adapter);
-
 
176
                $now = $utilMapper->getDatebaseNow();
173
            if($form->isValid()) {
Línea 177... Línea 174...
177
       
174
 
178
                
175
                
179
                $dataPost = (array) $form->getData();
176
                $dataPost = (array) $form->getData();
180
                $comment = new Comment();
177
                $comment = new Comment();
181
                $comment->comment = $dataPost['comment'];
178
                $comment->comment = $dataPost['comment'];
Línea 182... Línea 179...
182
                $comment->feed_id = $feed->id;
179
                $comment->feed_id = $feed->id;
-
 
180
                $comment->user_id = $currentUser->id;
-
 
181
                
183
                $comment->user_id = $currentUser->id;
182
                
Línea 184... Línea 183...
184
                
183
                $commentMapper = CommentMapper::getInstance($this->adapter);
Línea 185... Línea 184...
185
                
184
                $now = $commentMapper->getDatebaseNow();
Línea 298... Línea 297...
298
 
297
 
299
       
298
       
300
        $request = $this->getRequest();
299
        $request = $this->getRequest();
-
 
300
        if($request->isPost()) {
-
 
301
            $feedMapper = FeedMapper::getInstance($this->adapter);
301
        if($request->isPost()) {
302
            $now = $feedMapper->getDatebaseNow();
302
            $feedMapper = FeedMapper::getInstance($this->adapter);
303
            
303
            $feed = $feedMapper->fetchOneByUuid($id);
304
            $feed = $feedMapper->fetchOneByUuid($id);
304
            if(!$feed) {
305
            if(!$feed) {
305
                $response = [
306
                $response = [
Línea 320... Línea 321...
320
            $dataPost = $request->getPost()->toArray();
321
            $dataPost = $request->getPost()->toArray();
321
            $form = new CommentAnswerForm();
322
            $form = new CommentAnswerForm();
322
            $form->setData($dataPost);
323
            $form->setData($dataPost);
Línea 323... Línea 324...
323
            
324
            
324
            if($form->isValid()) {
-
 
325
                $utilMapper = UtilMapper::getInstance($this->adapter);
-
 
-
 
325
            if($form->isValid()) {
Línea 326... Línea 326...
326
                $now = $utilMapper->getDatebaseNow();
326
 
327
                
327
                
Línea 328... Línea 328...
328
                $companyUserMapper = CompanyUserMapper::getInstance($this->adapter);
328
                $companyUserMapper = CompanyUserMapper::getInstance($this->adapter);
Línea 660... Línea 660...
660
            $form = new CreateFeedForm($this->adapter);
660
            $form = new CreateFeedForm($this->adapter);
Línea 661... Línea 661...
661
            
661
            
Línea 662... Línea 662...
662
            $form->setData($dataPost);
662
            $form->setData($dataPost);
663
          
-
 
664
            if($form->isValid()) {
-
 
-
 
663
          
-
 
664
            if($form->isValid()) {
Línea 665... Línea 665...
665
                $utilMapper = UtilMapper::getInstance($this->adapter);
665
 
Línea 682... Línea 682...
682
                }
682
                }
Línea 683... Línea 683...
683
 
683
 
-
 
684
                   
-
 
685
              
684
                   
686
                $highPerformanceTeamsGroupsMapper = HighPerformanceTeamsGroupsMapper::getInstance($this->adapter);
Línea 685... Línea 687...
685
              
687
               
686
                $highPerformanceTeamsGroupsMapper = HighPerformanceTeamsGroupsMapper::getInstance($this->adapter);
688
                $now = $highPerformanceTeamsGroupsMapper->getDatebaseNow();
687
                $highPerformanceTeamsGroups = $highPerformanceTeamsGroupsMapper->fetchOneByUuid($group_uuid);
689
                $highPerformanceTeamsGroups = $highPerformanceTeamsGroupsMapper->fetchOneByUuid($group_uuid);
Línea 920... Línea 922...
920
                    'success' => false,
922
                    'success' => false,
921
                    'data' => 'ERROR_RECORD_NOT_FOUND'
923
                    'data' => 'ERROR_RECORD_NOT_FOUND'
922
                ]);
924
                ]);
923
            }
925
            }
Línea 924... Línea -...
924
 
-
 
925
            $utilMapper = UtilMapper::getInstance($this->adapter);
-
 
-
 
926
 
-
 
927
           
Línea 926... Línea 928...
926
            $now = $utilMapper->getDatebaseNow();
928
            
-
 
929
 
927
 
930
            
Línea 928... Línea 931...
928
            
931
            $highPerformanceTeamsGroupsMapper = HighPerformanceTeamsGroupsMapper::getInstance($this->adapter);
929
            $highPerformanceTeamsGroupsMapper = HighPerformanceTeamsGroupsMapper::getInstance($this->adapter);
932
            $now = $highPerformanceTeamsGroupsMapper->getDatebaseNow();
930
            $highPerformanceTeamsGroups = $highPerformanceTeamsGroupsMapper->fetchOneByUuid($group_uuid);
933
            $highPerformanceTeamsGroups = $highPerformanceTeamsGroupsMapper->fetchOneByUuid($group_uuid);
Línea 1130... Línea 1133...
1130
                        'data' => 'ERROR_METHOD_NOT_ALLOWED'
1133
                        'data' => 'ERROR_METHOD_NOT_ALLOWED'
1131
                    ]);
1134
                    ]);
1132
                }
1135
                }
Línea 1133... Línea 1136...
1133
                
1136
                
-
 
1137
                $topicMapper = TopicMapper::getInstance($this->adapter);
-
 
1138
                $now = $topicMapper->getDatebaseNow();
1134
                $topicMapper = TopicMapper::getInstance($this->adapter);
1139
                
Línea 1135... Línea 1140...
1135
                $topic = $topicMapper->fetchOneByUuid($topic_uuid);
1140
                $topic = $topicMapper->fetchOneByUuid($topic_uuid);
1136
 
1141
 
1137
                if (!$topic) {
1142
                if (!$topic) {
Línea 1148... Línea 1153...
1148
                        'success' => false,
1153
                        'success' => false,
1149
                        'data' => 'ERROR_METHOD_NOT_ALLOWED'
1154
                        'data' => 'ERROR_METHOD_NOT_ALLOWED'
1150
                    ]);
1155
                    ]);
1151
                }  
1156
                }  
Línea 1152... Línea -...
1152
                
-
 
1153
                $utilMapper = UtilMapper::getInstance($this->adapter);
-
 
-
 
1157
                
Línea 1154... Línea 1158...
1154
                $now = $utilMapper->getDatebaseNow();
1158
               
Línea 1155... Línea 1159...
1155
                
1159