Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16768 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 www 1
<?php
2
/**
3
 *
4
 * Controlador: Mis Perfiles
5
 *
6
 */
7
declare(strict_types=1);
8
 
9
namespace LeadersLinked\Controller;
10
 
11
use Laminas\Db\Adapter\AdapterInterface;
16768 efrain 12
 
1 www 13
use Laminas\Mvc\Controller\AbstractActionController;
14
use Laminas\Log\LoggerInterface;
15
use Laminas\View\Model\ViewModel;
16
use Laminas\View\Model\JsonModel;
17
 
18
use LeadersLinked\Library\Functions;
19
use LeadersLinked\Mapper\CompanyMapper;
20
use LeadersLinked\Mapper\CompanyUserMapper;
21
 
22
class MicrolearningController extends AbstractActionController
23
{
24
    /**
25
     *
16769 efrain 26
     * @var \Laminas\Db\Adapter\AdapterInterface
1 www 27
     */
28
    private $adapter;
29
 
30
    /**
31
     *
16769 efrain 32
     * @var \LeadersLinked\Cache\CacheInterface
1 www 33
     */
16769 efrain 34
    private $cache;
35
 
36
 
37
    /**
38
     *
39
     * @var \Laminas\Log\LoggerInterface
40
     */
1 www 41
    private $logger;
42
 
43
    /**
44
     *
45
     * @var array
46
     */
47
    private $config;
48
 
16769 efrain 49
 
1 www 50
    /**
51
     *
16769 efrain 52
     * @var \Laminas\Mvc\I18n\Translator
53
     */
54
    private $translator;
55
 
56
 
57
    /**
58
     *
59
     * @param \Laminas\Db\Adapter\AdapterInterface $adapter
60
     * @param \LeadersLinked\Cache\CacheInterface $cache
61
     * @param \Laminas\Log\LoggerInterface LoggerInterface $logger
1 www 62
     * @param array $config
16769 efrain 63
     * @param \Laminas\Mvc\I18n\Translator $translator
1 www 64
     */
16769 efrain 65
    public function __construct($adapter, $cache, $logger, $config, $translator)
1 www 66
    {
16769 efrain 67
        $this->adapter      = $adapter;
68
        $this->cache        = $cache;
69
        $this->logger       = $logger;
70
        $this->config       = $config;
71
        $this->translator   = $translator;
1 www 72
    }
73
 
74
    /**
75
     *
76
     * Generación del listado de perfiles
77
     * {@inheritDoc}
78
     * @see \Laminas\Mvc\Controller\AbstractActionController::indexAction()
79
     */
80
    public function indexAction()
81
    {
82
 
83
        $request = $this->getRequest();
84
        if($request->isGet()) {
85
 
86
 
87
 
88
            $this->layout()->setTemplate('layout/layout-backend.phtml');
89
            $viewModel = new ViewModel();
90
            $viewModel->setTemplate('leaders-linked/dashboard/index.phtml');
91
 
92
            return $viewModel ;
93
 
94
 
95
        } else {
96
            return new JsonModel([
97
                'success' => false,
98
                'data' => 'ERROR_METHOD_NOT_ALLOWED'
99
            ]);
100
        }
101
    }
102
}