Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
4376 nelberth 1
<?php
2
declare(strict_types=1);
3
 
4
namespace LeadersLinked\Controller;
5
 
6
use Laminas\Authentication\AuthenticationService;
7
use Laminas\Authentication\Result as AuthResult;
8
use Laminas\Db\Adapter\AdapterInterface;
16768 efrain 9
 
4376 nelberth 10
use Laminas\Mvc\Controller\AbstractActionController;
11
use Laminas\Mvc\I18n\Translator;
12
use Laminas\Log\LoggerInterface;
13
use Laminas\View\Model\ViewModel;
14
use Laminas\View\Model\JsonModel;
15
use LeadersLinked\Hydrator\ObjectPropertyHydrator;
16
 
4378 nelberth 17
class HighPerformanceTeamsController extends AbstractActionController
4376 nelberth 18
{
19
    /**
20
     *
16769 efrain 21
     * @var \Laminas\Db\Adapter\AdapterInterface
4376 nelberth 22
     */
23
    private $adapter;
24
 
25
    /**
26
     *
16769 efrain 27
     * @var \LeadersLinked\Cache\CacheInterface
4376 nelberth 28
     */
16769 efrain 29
    private $cache;
30
 
31
 
32
    /**
33
     *
34
     * @var \Laminas\Log\LoggerInterface
35
     */
4376 nelberth 36
    private $logger;
37
 
38
    /**
39
     *
40
     * @var array
41
     */
42
    private $config;
43
 
16769 efrain 44
 
4376 nelberth 45
    /**
46
     *
16769 efrain 47
     * @var \Laminas\Mvc\I18n\Translator
48
     */
49
    private $translator;
50
 
51
 
52
    /**
53
     *
54
     * @param \Laminas\Db\Adapter\AdapterInterface $adapter
55
     * @param \LeadersLinked\Cache\CacheInterface $cache
56
     * @param \Laminas\Log\LoggerInterface LoggerInterface $logger
4376 nelberth 57
     * @param array $config
16769 efrain 58
     * @param \Laminas\Mvc\I18n\Translator $translator
4376 nelberth 59
     */
16769 efrain 60
    public function __construct($adapter, $cache, $logger, $config, $translator)
4376 nelberth 61
    {
16769 efrain 62
        $this->adapter      = $adapter;
63
        $this->cache        = $cache;
64
        $this->logger       = $logger;
65
        $this->config       = $config;
66
        $this->translator   = $translator;
4376 nelberth 67
    }
68
 
69
    public function indexAction()
70
    {
71
        $request = $this->getRequest();
72
 
73
        $request = $this->getRequest();
74
        if($request->isGet()) {
75
 
76
            $this->layout()->setTemplate('layout/layout-backend');
77
            $viewModel = new ViewModel();
78
            $viewModel->setTemplate('leaders-linked/high-performance-teams/index.phtml');
79
            return $viewModel ;
80
 
81
 
82
        } else {
83
            return new JsonModel([
84
                'success' => false,
85
                'data' => 'ERROR_METHOD_NOT_ALLOWED'
86
            ]);;
87
        }
88
    }
89
}