Proyectos de Subversion LeadersLinked - Backend

Rev

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