| Línea 2... |
Línea 2... |
| 2 |
declare(strict_types=1);
|
2 |
declare(strict_types=1);
|
| Línea 3... |
Línea 3... |
| 3 |
|
3 |
|
| Línea 4... |
Línea 4... |
| 4 |
namespace LeadersLinked\Controller;
|
4 |
namespace LeadersLinked\Controller;
|
| 5 |
|
5 |
|
| 6 |
use Laminas\Db\Adapter\AdapterInterface;
|
6 |
use Laminas\Db\Adapter\AdapterInterface;
|
| 7 |
use Laminas\Cache\Storage\Adapter\AbstractAdapter;
|
7 |
use LeadersLinked\Cache\CacheInterface;
|
| 8 |
use Laminas\Mvc\Controller\AbstractActionController;
|
8 |
use Laminas\Mvc\Controller\AbstractActionController;
|
| 9 |
use Laminas\Log\LoggerInterface;
|
9 |
use Laminas\Log\LoggerInterface;
|
| 10 |
use Laminas\View\Model\ViewModel;
|
10 |
use Laminas\View\Model\ViewModel;
|
| Línea 47... |
Línea 47... |
| 47 |
private $adapter;
|
47 |
private $adapter;
|
| Línea 48... |
Línea 48... |
| 48 |
|
48 |
|
| 49 |
|
49 |
|
| 50 |
/**
|
50 |
/**
|
| 51 |
*
|
51 |
*
|
| 52 |
* @var AbstractAdapter
|
52 |
* @var CacheInterface
|
| Línea 53... |
Línea 53... |
| 53 |
*/
|
53 |
*/
|
| 54 |
private $cache;
|
54 |
private $cache;
|
| Línea 67... |
Línea 67... |
| 67 |
private $config;
|
67 |
private $config;
|
| Línea 68... |
Línea 68... |
| 68 |
|
68 |
|
| 69 |
/**
|
69 |
/**
|
| 70 |
*
|
70 |
*
|
| 71 |
* @param AdapterInterface $adapter
|
71 |
* @param AdapterInterface $adapter
|
| 72 |
* @param AbstractAdapter $cache
|
72 |
*@param CacheInterface $cache
|
| 73 |
* @param LoggerInterface $logger
|
73 |
* @param LoggerInterface $logger
|
| 74 |
* @param array $config
|
74 |
* @param array $config
|
| 75 |
*/
|
75 |
*/
|
| 76 |
public function __construct($adapter, $cache , $logger, $config)
|
76 |
public function __construct($adapter, $cache , $logger, $config)
|
| Línea 112... |
Línea 112... |
| 112 |
}
|
112 |
}
|
| Línea 113... |
Línea 113... |
| 113 |
|
113 |
|
| Línea 114... |
Línea 114... |
| 114 |
if($isJson) {
|
114 |
if($isJson) {
|
| 115 |
|
115 |
|
| Línea 116... |
Línea 116... |
| 116 |
$search = $this->params()->fromQuery('search', []);
|
116 |
$search = $this->params()->fromQuery('search', []);
|
| 117 |
$search = empty($search['value']) ? '' : filter_var($search['value'], FILTER_SANITIZE_STRING);
|
117 |
$search = empty($search['value']) ? '' : Functions::sanitizeFilterString($search['value']);
|
| 118 |
|
118 |
|
| 119 |
$page = intval($this->params()->fromQuery('start', 1), 10);
|
119 |
$page = intval($this->params()->fromQuery('start', 1), 10);
|
| 120 |
$records_x_page = intval($this->params()->fromQuery('length', 10), 10);
|
120 |
$records_x_page = intval($this->params()->fromQuery('length', 10), 10);
|
| Línea 121... |
Línea 121... |
| 121 |
$order = $this->params()->fromQuery('order', []);
|
121 |
$order = $this->params()->fromQuery('order', []);
|
| 122 |
$order_field = empty($order[0]['column']) ? 99 : intval($order[0]['column'], 10);
|
122 |
$order_field = empty($order[0]['column']) ? 99 : intval($order[0]['column'], 10);
|
| Línea 123... |
Línea 123... |
| 123 |
$order_direction = empty($order[0]['dir']) ? 'ASC' : strtoupper(filter_var( $order[0]['dir'], FILTER_SANITIZE_STRING));
|
123 |
$order_direction = empty($order[0]['dir']) ? 'ASC' : strtoupper(Functions::sanitizeFilterString($order[0]['dir']));
|
| Línea 414... |
Línea 414... |
| 414 |
$companyMicrolearningExtendUser->company_id = $currentCompany->id;
|
414 |
$companyMicrolearningExtendUser->company_id = $currentCompany->id;
|
| 415 |
$companyMicrolearningExtendUser->user_id = $user->id;
|
415 |
$companyMicrolearningExtendUser->user_id = $user->id;
|
| 416 |
}
|
416 |
}
|
| Línea 417... |
Línea 417... |
| 417 |
|
417 |
|
| 418 |
|
418 |
|
| 419 |
$extend_company_uuid = filter_var( $this->params()->fromPost('company_id'), FILTER_SANITIZE_STRING);
|
419 |
$extend_company_uuid = Functions::sanitizeFilterString($this->params()->fromPost('company_id'));
|
| 420 |
$extend_function_uuid = filter_var( $this->params()->fromPost('function_id'), FILTER_SANITIZE_STRING);
|
420 |
$extend_function_uuid = Functions::sanitizeFilterString($this->params()->fromPost('function_id'));
|
| 421 |
$extend_group_uuid = filter_var( $this->params()->fromPost('group_id'), FILTER_SANITIZE_STRING);
|
421 |
$extend_group_uuid = Functions::sanitizeFilterString($this->params()->fromPost('group_id'));
|
| 422 |
$extend_institution_uuid = filter_var( $this->params()->fromPost('institution_id'), FILTER_SANITIZE_STRING);
|
422 |
$extend_institution_uuid = Functions::sanitizeFilterString($this->params()->fromPost('institution_id'));
|
| 423 |
$extend_program_uuid = filter_var( $this->params()->fromPost('program_id'), FILTER_SANITIZE_STRING);
|
423 |
$extend_program_uuid = Functions::sanitizeFilterString($this->params()->fromPost('program_id'));
|
| 424 |
$extend_partner_uuid = filter_var( $this->params()->fromPost('partner_id'), FILTER_SANITIZE_STRING);
|
424 |
$extend_partner_uuid = Functions::sanitizeFilterString($this->params()->fromPost('partner_id'));
|
| Línea 425... |
Línea 425... |
| 425 |
$extend_sector_uuid = filter_var( $this->params()->fromPost('sector_id'), FILTER_SANITIZE_STRING);
|
425 |
$extend_sector_uuid = Functions::sanitizeFilterString($this->params()->fromPost('sector_id'));
|
| 426 |
$extend_student_type_uuid = filter_var( $this->params()->fromPost('student_type_id'), FILTER_SANITIZE_STRING);
|
426 |
$extend_student_type_uuid = Functions::sanitizeFilterString($this->params()->fromPost('student_type_id'));
|
| 427 |
|
427 |
|