Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5373 | Rev 6749 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5373 Rev 6388
Línea 8... Línea 8...
8
use Laminas\Cache\Storage\Adapter\AbstractAdapter;
8
use Laminas\Cache\Storage\Adapter\AbstractAdapter;
9
use Laminas\Mvc\Controller\AbstractActionController;
9
use Laminas\Mvc\Controller\AbstractActionController;
10
use Laminas\Log\LoggerInterface;
10
use Laminas\Log\LoggerInterface;
11
use Laminas\View\Model\ViewModel;
11
use Laminas\View\Model\ViewModel;
12
use Laminas\View\Model\JsonModel;
12
use Laminas\View\Model\JsonModel;
13
use LeadersLinked\Model\Page;
-
 
14
use LeadersLinked\Mapper\NotificationMapper;
13
use LeadersLinked\Mapper\NotificationMapper;
15
use LeadersLinked\Mapper\CompanyMapper;
-
 
16
use LeadersLinked\Mapper\CompanyUserMapper;
-
 
17
use LeadersLinked\Model\Company;
-
 
18
use LeadersLinked\Mapper\PageMapper;
-
 
19
use LeadersLinked\Mapper\MessageMapper;
-
 
20
use LeadersLinked\Mapper\UserMapper;
14
use LeadersLinked\Mapper\UserMapper;
21
use LeadersLinked\Mapper\UserProfileMapper;
15
use LeadersLinked\Mapper\UserProfileMapper;
22
use LeadersLinked\Mapper\CompanyUserRoleMapper;
-
 
23
use LeadersLinked\Model\Role;
-
 
24
use LeadersLinked\Library\Functions;
16
use LeadersLinked\Library\Functions;
25
use LeadersLinked\Mapper\ConnectionMapper;
17
use LeadersLinked\Mapper\ConnectionMapper;
26
use LeadersLinked\Mapper\LocationMapper;
18
use LeadersLinked\Mapper\LocationMapper;
27
use LeadersLinked\Mapper\PostMapper;
-
 
28
use LeadersLinked\Mapper\ProfileVisitMapper;
19
use LeadersLinked\Mapper\ProfileVisitMapper;
29
use LeadersLinked\Model\Post;
-
 
30
use LeadersLinked\Mapper\UtilMapper;
-
 
31
use LeadersLinked\Model\Notification;
-
 
Línea 32... Línea 20...
32
 
20
 
33
class NotificationController extends AbstractActionController
21
class NotificationController extends AbstractActionController
34
{
22
{
35
    /**
23
    /**
Línea 105... Línea 93...
105
                    }
93
                    }
106
                }
94
                }
107
            }
95
            }
Línea 108... Línea 96...
108
 
96
 
109
            if ($isJson) {
-
 
110
 
-
 
111
                $utilMapper = UtilMapper::getInstance($this->adapter);
-
 
112
                $now = $utilMapper->getDatebaseNow();
-
 
113
 
-
 
114
 
97
            if ($isJson) {
-
 
98
                $notificationMapper = NotificationMapper::getInstance($this->adapter);
-
 
99
                $now = $notificationMapper->getDatebaseNow();
115
                $notificationMapper = NotificationMapper::getInstance($this->adapter);
100
                
Línea 116... Línea 101...
116
                $records = $notificationMapper->fetchAllByUserId($currentUser->id);
101
                $records = $notificationMapper->fetchAllByUserId($currentUser->id);
Línea 192... Línea 177...
192
    public function unreadsAction()
177
    public function unreadsAction()
193
    {
178
    {
194
        $request = $this->getRequest();
179
        $request = $this->getRequest();
195
        if ($request->isGet()) {
180
        if ($request->isGet()) {
Línea 196... Línea -...
196
 
-
 
197
            $utilMapper = UtilMapper::getInstance($this->adapter);
-
 
198
            $now = $utilMapper->getDatebaseNow();
-
 
199
 
181
 
200
            $currentUserPlugin = $this->plugin('currentUserPlugin');
182
            $currentUserPlugin = $this->plugin('currentUserPlugin');
Línea 201... Línea 183...
201
            $currentUser = $currentUserPlugin->getUser();
183
            $currentUser = $currentUserPlugin->getUser();
-
 
184
 
-
 
185
            $notificationMapper = NotificationMapper::getInstance($this->adapter);
202
 
186
            $now = $notificationMapper->getDatebaseNow();
Línea 203... Línea 187...
203
            $notificationMapper = NotificationMapper::getInstance($this->adapter);
187
            
204
            $records = $notificationMapper->fetchAllsUnreadByUserId($currentUser->id);
188
            $records = $notificationMapper->fetchAllsUnreadByUserId($currentUser->id);
205
 
189