Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16769 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 16769 Rev 17002
Línea 13... Línea 13...
13
 
13
 
14
use Laminas\View\Model\ViewModel;
14
use Laminas\View\Model\ViewModel;
15
use Laminas\View\Model\JsonModel;
15
use Laminas\View\Model\JsonModel;
16
use LeadersLinked\Library\Functions;
16
use LeadersLinked\Library\Functions;
17
use LeadersLinked\Hydrator\ObjectPropertyHydrator;
17
use LeadersLinked\Hydrator\ObjectPropertyHydrator;
18
use LeadersLinked\Mapper\CompanyMicrolearningExtendUserFunctionMapper;
18
use LeadersLinked\Mapper\MicrolearningExtendUserFunctionMapper;
19
use LeadersLinked\Form\SettingReportForm;
19
use LeadersLinked\Form\SettingReportForm;
Línea 20... Línea 20...
20
use LeadersLinked\Model\CompanyMicrolearningExtendUserFunction;
20
use LeadersLinked\Model\MicrolearningExtendUserFunction;
21
 
21
 
22
class MicrolearningExtendUserFunctionController extends AbstractActionController
22
class MicrolearningExtendUserFunctionController extends AbstractActionController
23
{
23
{
Línea 114... Línea 114...
114
                
114
                
115
                if(!in_array($order_direction, ['ASC', 'DESC'])) {
115
                if(!in_array($order_direction, ['ASC', 'DESC'])) {
116
                    $order_direction = 'ASC';
116
                    $order_direction = 'ASC';
Línea 117... Línea 117...
117
                }
117
                }
118
    
118
    
Línea 119... Línea 119...
119
                $mapper = CompanyMicrolearningExtendUserFunctionMapper::getInstance($this->adapter);
119
                $mapper = MicrolearningExtendUserFunctionMapper::getInstance($this->adapter);
120
                $paginator = $mapper->fetchAllDataTableByCompanyId($currentCompany->id, $search, $page, $records_x_page, $order_field, $order_direction);
120
                $paginator = $mapper->fetchAllDataTableByCompanyId($currentCompany->id, $search, $page, $records_x_page, $order_field, $order_direction);
121
                
121
                
Línea 180... Línea 180...
180
            
180
            
181
            if($form->isValid()) {
181
            if($form->isValid()) {
Línea 182... Línea 182...
182
                $dataPost = (array) $form->getData();
182
                $dataPost = (array) $form->getData();
183
 
183
 
184
                $hydrator = new ObjectPropertyHydrator();
184
                $hydrator = new ObjectPropertyHydrator();
Línea 185... Línea 185...
185
                $studentType = new CompanyMicrolearningExtendUserFunction();
185
                $studentType = new MicrolearningExtendUserFunction();
Línea 186... Línea 186...
186
                $hydrator->hydrate($dataPost, $studentType);
186
                $hydrator->hydrate($dataPost, $studentType);
187
                
187
                
Línea 188... Línea 188...
188
                $studentType->company_id = $currentCompany->id;
188
                $studentType->company_id = $currentCompany->id;
189
 
189
 
Línea 254... Línea 254...
254
            ];
254
            ];
Línea 255... Línea 255...
255
            
255
            
256
            return new JsonModel($data);
256
            return new JsonModel($data);
Línea 257... Línea 257...
257
        }
257
        }
258
 
258
 
259
        $mapper = CompanyMicrolearningExtendUserFunctionMapper::getInstance($this->adapter);
259
        $mapper = MicrolearningExtendUserFunctionMapper::getInstance($this->adapter);
260
        $studentType = $mapper->fetchOneByUuid($uuid);
260
        $studentType = $mapper->fetchOneByUuid($uuid);
261
        if(!$studentType) {
261
        if(!$studentType) {
262
            $data = [
262
            $data = [
Línea 358... Línea 358...
358
            ];
358
            ];
Línea 359... Línea 359...
359
            
359
            
360
            return new JsonModel($data);
360
            return new JsonModel($data);
Línea 361... Línea 361...
361
        }
361
        }
362
        
362
        
363
        $mapper = CompanyMicrolearningExtendUserFunctionMapper::getInstance($this->adapter);
363
        $mapper = MicrolearningExtendUserFunctionMapper::getInstance($this->adapter);
364
        $studentType = $mapper->fetchOneByUuid($uuid);
364
        $studentType = $mapper->fetchOneByUuid($uuid);
365
        if(!$studentType) {
365
        if(!$studentType) {
366
            $data = [
366
            $data = [