Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 15676 | Rev 15678 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
15670 anderson 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Controller;
6
 
7
use Laminas\Mvc\Controller\AbstractActionController;
8
use Laminas\View\Model\ViewModel;
15673 anderson 9
use Laminas\View\Model\JsonModel;
15670 anderson 10
 
11
// Create an action controller.
12
class DiscoveryContactProgressController extends AbstractActionController
13
{
14
    // Define an action "world".
15
    public function indexAction()
16
    {
15674 anderson 17
        $currentUserPlugin = $this->plugin('currentUserPlugin');
18
        $currentUser = $currentUserPlugin->getUser();
19
        $currentCompany = $currentUserPlugin->getCompany();
15670 anderson 20
 
15674 anderson 21
        $request = $this->getRequest();
22
        if ($request->isGet()) {
15677 anderson 23
            $headers  = $request->getHeaders();
24
            $isJson = false;
25
            return new JsonModel([
26
                'success' => true,
27
                'message' => $isJson
28
            ]);
15675 anderson 29
        }
15673 anderson 30
        return new JsonModel([
31
            'success' => true,
15676 anderson 32
            'message' => $currentUser
15673 anderson 33
        ]);
15670 anderson 34
    }
35
}