Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 1 | Rev 16768 | Ir a la última revisión | | 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;
16766 efrain 12
use LeadersLinked\Cache\CacheInterface;
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
     *
26
     * @var AdapterInterface
27
     */
28
    private $adapter;
29
 
30
 
31
    /**
32
     *
16766 efrain 33
     * @var CacheInterface
1 www 34
     */
35
    private $cache;
36
 
37
    /**
38
     *
39
     * @var  LoggerInterface
40
     */
41
    private $logger;
42
 
43
 
44
    /**
45
     *
46
     * @var array
47
     */
48
    private $config;
49
 
50
    /**
51
     *
52
     * @param AdapterInterface $adapter
16766 efrain 53
     * @param CacheInterface $cache
1 www 54
     * @param LoggerInterface $logger
55
     * @param array $config
56
     */
57
    public function __construct($adapter, $cache , $logger,  $config)
58
    {
59
        $this->adapter      = $adapter;
60
        $this->cache        = $cache;
61
        $this->logger       = $logger;
62
        $this->config       = $config;
63
 
64
    }
65
 
66
    /**
67
     *
68
     * Generación del listado de perfiles
69
     * {@inheritDoc}
70
     * @see \Laminas\Mvc\Controller\AbstractActionController::indexAction()
71
     */
72
    public function indexAction()
73
    {
74
 
75
        $request = $this->getRequest();
76
        if($request->isGet()) {
77
 
78
 
79
 
80
            $this->layout()->setTemplate('layout/layout-backend.phtml');
81
            $viewModel = new ViewModel();
82
            $viewModel->setTemplate('leaders-linked/dashboard/index.phtml');
83
 
84
            return $viewModel ;
85
 
86
 
87
        } else {
88
            return new JsonModel([
89
                'success' => false,
90
                'data' => 'ERROR_METHOD_NOT_ALLOWED'
91
            ]);
92
        }
93
    }
94
}