Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 14735 Rev 14742
Línea 109... Línea 109...
109
                $allowAproved = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/aproved');
109
                $allowAproved = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/aproved');
110
                $allowCategories = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/categories');
110
                $allowCategories = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/categories');
Línea 111... Línea 111...
111
 
111
 
112
                $items = [];
112
                $items = [];
113
                $feedMapper = FeedMapper::getInstance($this->adapter);
113
                $feedMapper = FeedMapper::getInstance($this->adapter);
114
              
114
               
Línea 115... Línea 115...
115
                $paginator = $feedMapper->fetchAllByDevelop($search, $page, $records_x_page);
115
                $paginator = $feedMapper->fetchAllByDevelop($allowEdit);
116
              
116
              
117
                foreach ($paginator as $record) {
117
                foreach ($paginator as $record) {
118
                    $topicMapper = TopicMapper::getInstance($this->adapter);
118
                    $topicMapper = TopicMapper::getInstance($this->adapter);
Línea 229... Línea 229...
229
                'data' => 'ERROR_METHOD_NOT_ALLOWED'
229
                'data' => 'ERROR_METHOD_NOT_ALLOWED'
230
            ]);
230
            ]);
231
        }
231
        }
232
    }
232
    }
Línea 233... Línea -...
233
 
-
 
234
    // public function internAction() {
-
 
235
    //     $request = $this->getRequest();
-
 
236
    //     $currentUserPlugin = $this->plugin('currentUserPlugin');
-
 
237
    //     $currentCompany = $currentUserPlugin->getCompany();
-
 
238
    //     $currentUser = $currentUserPlugin->getUser();
-
 
239
 
-
 
240
    //     try{
-
 
241
    //         $request = $this->getRequest();
-
 
242
    //         if ($request->isGet()) {
-
 
243
 
-
 
244
    //             $headers = $request->getHeaders();
-
 
245
 
-
 
246
    //             $isJson = false;
-
 
247
    //             if ($headers->has('Accept')) {
-
 
248
    //                 $accept = $headers->get('Accept');
-
 
249
 
-
 
250
    //                 $prioritized = $accept->getPrioritized();
-
 
251
 
-
 
252
    //                 foreach ($prioritized as $key => $value) {
-
 
253
    //                     $raw = trim($value->getRaw());
-
 
254
 
-
 
255
    //                     if (!$isJson) {
-
 
256
    //                         $isJson = strpos($raw, 'json');
-
 
257
    //                     }
-
 
258
    //                 }
-
 
259
    //             }
-
 
260
    //             $topicMapper = TopicMapper::getInstance($this->adapter);
-
 
261
    //             $categories = $topicMapper->fetchAllDevelopment();
-
 
262
 
-
 
263
    //             if ($isJson) {
-
 
264
    //                 $search = $this->params()->fromQuery('search', []);
-
 
265
    //                 $search = empty($search['value']) ? '' : filter_var($search['value'], FILTER_SANITIZE_STRING);
-
 
266
 
-
 
267
    //                 $page = intval($this->params()->fromQuery('start', 1), 10);
-
 
268
    //                 $records_x_page = intval($this->params()->fromQuery('length', 10), 10);
-
 
269
    //                 $order = $this->params()->fromQuery('order', []);
-
 
270
    //                 $order_field = empty($order[0]['column']) ? 99 : intval($order[0]['column'], 10);
-
 
271
    //                 $order_direction = empty($order[0]['dir']) ? 'ASC' : strtoupper(filter_var($order[0]['dir'], FILTER_SANITIZE_STRING));
-
 
272
 
-
 
273
    //                 $fields = ['title'];
-
 
274
    //                 $order_field = isset($fields[$order_field]) ? $fields[$order_field] : 'title';
-
 
275
 
-
 
276
    //                 if (!in_array($order_direction, ['ASC', 'DESC'])) {
-
 
277
    //                     $order_direction = 'ASC';
-
 
278
    //                 }
-
 
279
 
-
 
280
    //                 $acl = $this->getEvent()->getViewModel()->getVariable('acl');
-
 
281
    //                 $allowAdd = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/add');
-
 
282
    //                 $allowEdit = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/edit');
-
 
283
    //                 $allowDelete = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/delete');
-
 
284
    //                 $allowAproved = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/aproved');
-
 
285
 
-
 
286
    //                 $items = [];
-
 
287
    //                 $feedMapper = FeedMapper::getInstance($this->adapter);
-
 
288
                    
-
 
289
    //                 $paginator = $feedMapper->fetchAllByDevelopInternContent();
-
 
290
    //                 return new JsonModel([
-
 
291
    //                     'success' => false,
-
 
292
    //                     'data' => $paginator
-
 
293
    //                 ]);
-
 
294
                
-
 
295
    //                 foreach ($paginator as $record) {
-
 
296
    //                     $topicMapper = TopicMapper::getInstance($this->adapter);
-
 
297
    //                     $topic = $topicMapper->fetchOne($record->topic_id);
-
 
298
    //                     $item = [
-
 
299
    //                         'id' => $record->id,
-
 
300
    //                         'uuid' => $record->uuid,
-
 
301
    //                         'title' => $record->title,
-
 
302
    //                         'topic' => $topic->title,
-
 
303
    //                         'description' => $record->description,
-
 
304
    //                         'file' => $record->file_type ? $record->file_type : '',
-
 
305
    //                         'link_media' => $record->link_media ? $record->link_media : '',
-
 
306
    //                         'link_name' => $record->link_name,
-
 
307
    //                         'file_name' => $record->file_name ? $record->file_name : '',
-
 
308
    //                         'link_file' => $this->url()->fromRoute('storage', ['code' => $record->uuid, 'type' => 'feed', 'filename' => $record->file_name]),
-
 
309
    //                         'status' => $record->status,
-
 
310
    //                         'actions' => [
-
 
311
    //                             'link_edit' => $this->url()->fromRoute('development-and-content/waiting/edit', ['id' => $record->uuid]),
-
 
312
    //                             'link_aproved' => $this->url()->fromRoute('development-and-content/waiting/aproved', ['id' => $record->uuid]),
-
 
313
    //                             'link_delete' => $this->url()->fromRoute('development-and-content/waiting/delete', ['id' => $record->uuid]),
-
 
314
    //                         ]
-
 
315
    //                     ];
-
 
316
 
-
 
317
    //                     array_push($items, $item);
-
 
318
    //                 }
-
 
319
 
-
 
320
    //                 return new JsonModel([
-
 
321
    //                     'success' => true,
-
 
322
    //                     'data' => [
-
 
323
    //                         'items' => $items,
-
 
324
    //                     ]
-
 
325
    //                 ]);
-
 
326
    //             } else {
-
 
327
 
-
 
328
    //                 $form = new CreateFeedForm($this->adapter, $currentCompany->id);
-
 
329
 
-
 
330
    //                 $this->layout()->setTemplate('layout/layout-backend');
-
 
331
    //                 $viewModel = new ViewModel();
-
 
332
    //                 $viewModel->setTemplate('leaders-linked/development-content-waiting/internt.phtml');
-
 
333
    //                 $viewModel->setVariables([
-
 
334
    //                     'form' => $form,
-
 
335
    //                     'categories' => $categories,
-
 
336
    //                 ]);
-
 
337
    //                 return $viewModel;
-
 
338
    //             }
-
 
339
    //         } else {
-
 
340
    //             return new JsonModel([
-
 
341
    //                 'success' => false,
-
 
342
    //                 'data' => 'ERROR_METHOD_NOT_ALLOWED'
-
 
343
    //             ]);
-
 
344
    //         }
-
 
345
    //     } catch (\Throwable $e) {
-
 
346
    //             $e->getMessage();
-
 
347
    //             return new JsonModel([
-
 
348
    //                 'success' => false,
-
 
349
    //                 'data' => $e
-
 
350
    //             ]);
-
 
351
    //         }
-
 
352
    // }
-
 
353
    
-
 
354
 
-
 
355
    // public function externAction() {
-
 
356
    //     $request = $this->getRequest();
-
 
357
    //     $currentUserPlugin = $this->plugin('currentUserPlugin');
-
 
358
    //     $currentCompany = $currentUserPlugin->getCompany();
-
 
359
    //     $currentUser = $currentUserPlugin->getUser();
-
 
360
 
-
 
361
    //     try{
-
 
362
    //         $request = $this->getRequest();
-
 
363
    //         if ($request->isGet()) {
-
 
364
 
-
 
365
    //             $headers = $request->getHeaders();
-
 
366
 
-
 
367
    //             $isJson = false;
-
 
368
    //             if ($headers->has('Accept')) {
-
 
369
    //                 $accept = $headers->get('Accept');
-
 
370
 
-
 
371
    //                 $prioritized = $accept->getPrioritized();
-
 
372
 
-
 
373
    //                 foreach ($prioritized as $key => $value) {
-
 
374
    //                     $raw = trim($value->getRaw());
-
 
375
 
-
 
376
    //                     if (!$isJson) {
-
 
377
    //                         $isJson = strpos($raw, 'json');
-
 
378
    //                     }
-
 
379
    //                 }
-
 
380
    //             }
-
 
381
    //             $topicMapper = TopicMapper::getInstance($this->adapter);
-
 
382
    //             $categories = $topicMapper->fetchAllDevelopment();
-
 
383
 
-
 
384
    //             if ($isJson) {
-
 
385
    //                 $search = $this->params()->fromQuery('search', []);
-
 
386
    //                 $search = empty($search['value']) ? '' : filter_var($search['value'], FILTER_SANITIZE_STRING);
-
 
387
 
-
 
388
    //                 $page = intval($this->params()->fromQuery('start', 1), 10);
-
 
389
    //                 $records_x_page = intval($this->params()->fromQuery('length', 10), 10);
-
 
390
    //                 $order = $this->params()->fromQuery('order', []);
-
 
391
    //                 $order_field = empty($order[0]['column']) ? 99 : intval($order[0]['column'], 10);
-
 
392
    //                 $order_direction = empty($order[0]['dir']) ? 'ASC' : strtoupper(filter_var($order[0]['dir'], FILTER_SANITIZE_STRING));
-
 
393
 
-
 
394
    //                 $fields = ['title'];
-
 
395
    //                 $order_field = isset($fields[$order_field]) ? $fields[$order_field] : 'title';
-
 
396
 
-
 
397
    //                 if (!in_array($order_direction, ['ASC', 'DESC'])) {
-
 
398
    //                     $order_direction = 'ASC';
-
 
399
    //                 }
-
 
400
 
-
 
401
    //                 $acl = $this->getEvent()->getViewModel()->getVariable('acl');
-
 
402
    //                 $allowAdd = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/add');
-
 
403
    //                 $allowEdit = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/edit');
-
 
404
    //                 $allowDelete = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/delete');
-
 
405
    //                 $allowAproved = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/aproved');
-
 
406
 
-
 
407
    //                 $items = [];
-
 
408
    //                 $feedMapper = FeedMapper::getInstance($this->adapter);
-
 
409
                    
-
 
410
    //                 $paginator = $feedMapper->fetchAllByDevelopExternContent();
-
 
411
    //                 // return new JsonModel([
-
 
412
    //                 //     'success' => false,
-
 
413
    //                 //     'data' => $paginator
-
 
414
    //                 // ]);
-
 
415
                
-
 
416
    //                 foreach ($paginator as $record) {
-
 
417
    //                     $topicMapper = TopicMapper::getInstance($this->adapter);
-
 
418
    //                     $topic = $topicMapper->fetchOne($record->topic_id);
-
 
419
    //                     $item = [
-
 
420
    //                         'id' => $record->id,
-
 
421
    //                         'uuid' => $record->uuid,
-
 
422
    //                         'title' => $record->title,
-
 
423
    //                         'topic' => $topic->title,
-
 
424
    //                         'description' => $record->description,
-
 
425
    //                         'file' => $record->file_type ? $record->file_type : '',
-
 
426
    //                         'link_media' => $record->link_media ? $record->link_media : '',
-
 
427
    //                         'link_name' => $record->link_name,
-
 
428
    //                         'file_name' => $record->file_name ? $record->file_name : '',
-
 
429
    //                         'link_file' => $this->url()->fromRoute('storage', ['code' => $record->uuid, 'type' => 'feed', 'filename' => $record->file_name]),
-
 
430
    //                         'status' => $record->status,
-
 
431
    //                         'actions' => [
-
 
432
    //                             'link_edit' => $this->url()->fromRoute('development-and-content/waiting/edit', ['id' => $record->uuid]),
-
 
433
    //                             'link_aproved' => $this->url()->fromRoute('development-and-content/waiting/aproved', ['id' => $record->uuid]),
-
 
434
    //                             'link_delete' => $this->url()->fromRoute('development-and-content/waiting/delete', ['id' => $record->uuid]),
-
 
435
    //                         ]
-
 
436
    //                     ];
-
 
437
 
-
 
438
    //                     array_push($items, $item);
-
 
439
    //                 }
-
 
440
 
-
 
441
    //                 return new JsonModel([
-
 
442
    //                     'success' => true,
-
 
443
    //                     'data' => [
-
 
444
    //                         'items' => $items,
-
 
445
    //                     ]
-
 
446
    //                 ]);
-
 
447
    //             } else {
-
 
448
 
-
 
449
    //                 $form = new CreateFeedForm($this->adapter, $currentCompany->id);
-
 
450
 
-
 
451
    //                 $this->layout()->setTemplate('layout/layout-backend');
-
 
452
    //                 $viewModel = new ViewModel();
-
 
453
    //                 $viewModel->setTemplate('leaders-linked/development-content-waiting/extern.phtml');
-
 
454
    //                 $viewModel->setVariables([
-
 
455
    //                     'form' => $form,
-
 
456
    //                     'categories' => $categories,
-
 
457
    //                 ]);
-
 
458
    //                 return $viewModel;
-
 
459
    //             }
-
 
460
    //         } else {
-
 
461
    //             return new JsonModel([
-
 
462
    //                 'success' => false,
-
 
463
    //                 'data' => 'ERROR_METHOD_NOT_ALLOWED'
-
 
464
    //             ]);
-
 
465
    //         }
-
 
466
    //     } catch (\Throwable $e) {
-
 
467
    //         $e->getMessage();
-
 
468
    //         return new JsonModel([
-
 
469
    //             'success' => false,
-
 
470
    //             'data' => $e
-
 
471
    //         ]);
-
 
472
    //     }
-
 
473
    // }
-
 
474
 
-
 
475
    // public function categoriesAction() {
-
 
476
    //     $request = $this->getRequest();
-
 
477
    //     $currentUserPlugin = $this->plugin('currentUserPlugin');
-
 
478
    //     $currentCompany = $currentUserPlugin->getCompany();
-
 
479
    //     $currentUser = $currentUserPlugin->getUser();
-
 
480
    //     $id =  $this->params()->fromRoute('id');
-
 
481
 
-
 
482
    //     try{
-
 
483
    //     $request = $this->getRequest();
-
 
484
    //         if ($request->isGet()) {
-
 
485
 
-
 
486
    //             $headers = $request->getHeaders();
-
 
487
 
-
 
488
    //             $isJson = false;
-
 
489
    //             if ($headers->has('Accept')) {
-
 
490
    //                 $accept = $headers->get('Accept');
-
 
491
 
-
 
492
    //                 $prioritized = $accept->getPrioritized();
-
 
493
 
-
 
494
    //                 foreach ($prioritized as $key => $value) {
-
 
495
    //                     $raw = trim($value->getRaw());
-
 
496
 
-
 
497
    //                     if (!$isJson) {
-
 
498
    //                         $isJson = strpos($raw, 'json');
-
 
499
    //                     }
-
 
500
    //                 }
-
 
501
    //             }
-
 
502
    //             $topicMapper = TopicMapper::getInstance($this->adapter);
-
 
503
    //             $categories = $topicMapper->fetchAllDevelopment();
-
 
504
 
-
 
505
    //             $route = $topicMapper->fetchOneByUuid($id);
-
 
506
 
-
 
507
    //             if ($isJson) {
-
 
508
    //                 $search = $this->params()->fromQuery('search', []);
-
 
509
    //                 $search = empty($search['value']) ? '' : filter_var($search['value'], FILTER_SANITIZE_STRING);
-
 
510
 
-
 
511
    //                 $page = intval($this->params()->fromQuery('start', 1), 10);
-
 
512
    //                 $records_x_page = intval($this->params()->fromQuery('length', 10), 10);
-
 
513
    //                 $order = $this->params()->fromQuery('order', []);
-
 
514
    //                 $order_field = empty($order[0]['column']) ? 99 : intval($order[0]['column'], 10);
-
 
515
    //                 $order_direction = empty($order[0]['dir']) ? 'ASC' : strtoupper(filter_var($order[0]['dir'], FILTER_SANITIZE_STRING));
-
 
516
 
-
 
517
    //                 $fields = ['title'];
-
 
518
    //                 $order_field = isset($fields[$order_field]) ? $fields[$order_field] : 'title';
-
 
519
 
-
 
520
    //                 if (!in_array($order_direction, ['ASC', 'DESC'])) {
-
 
521
    //                     $order_direction = 'ASC';
-
 
522
    //                 }
-
 
523
 
-
 
524
    //                 $items = [];
-
 
525
    //                 $feedMapper = FeedMapper::getInstance($this->adapter);
-
 
526
                    
-
 
527
    //                 $paginator = $feedMapper->fetchAllByTopicId($route->id);
-
 
528
 
-
 
529
    //                 foreach ($paginator as $record) {
-
 
530
    //                     $topicMapper = TopicMapper::getInstance($this->adapter);
-
 
531
    //                     $topic = $topicMapper->fetchOne($record->topic_id);
-
 
532
    //                     $item = [
-
 
533
    //                         'id' => $record->id,
-
 
534
    //                         'uuid' => $record->uuid,
-
 
535
    //                         'title' => $record->title,
-
 
536
    //                         'topic' => $topic->title,
-
 
537
    //                         'description' => $record->description,
-
 
538
    //                         'file' => $record->file_type ? $record->file_type : '',
-
 
539
    //                         'link_media' => $record->link_media ? $record->link_media : '',
-
 
540
    //                         'link_name' => $record->link_name,
-
 
541
    //                         'file_name' => $record->file_name ? $record->file_name : '',
-
 
542
    //                         'link_file' => $this->url()->fromRoute('storage', ['code' => $record->uuid, 'type' => 'feed', 'filename' => $record->file_name]),
-
 
543
    //                         'status' => $record->status,
-
 
544
    //                         'actions' => [
-
 
545
    //                             'link_edit' => $this->url()->fromRoute('development-and-content/waiting/edit', ['id' => $record->uuid]),
-
 
546
    //                             'link_aproved' => $this->url()->fromRoute('development-and-content/waiting/aproved', ['id' => $record->uuid]),
-
 
547
    //                             'link_delete' => $this->url()->fromRoute('development-and-content/waiting/delete', ['id' => $record->uuid]),
-
 
548
    //                         ]
-
 
549
    //                     ];
-
 
550
 
-
 
551
    //                     array_push($items, $item);
-
 
552
    //                 }
-
 
553
 
-
 
554
    //                 return new JsonModel([
-
 
555
    //                     'success' => true,
-
 
556
    //                     'data' => [
-
 
557
    //                         'items' => $items,
-
 
558
    //                     ]
-
 
559
    //                 ]);
-
 
560
    //             } else {
-
 
561
 
-
 
562
    //                 $form = new CreateFeedForm($this->adapter, $currentCompany->id);
-
 
563
 
-
 
564
    //                 $this->layout()->setTemplate('layout/layout-backend');
-
 
565
    //                 $viewModel = new ViewModel();
-
 
566
    //                 $viewModel->setTemplate('leaders-linked/development-content-waiting/categories.phtml');
-
 
567
    //                 $viewModel->setVariables([
-
 
568
    //                     'form' => $form,
-
 
569
    //                     'id' => $id,
-
 
570
    //                     'categories' => $categories,
-
 
571
    //                 ]);
-
 
572
    //                 return $viewModel;
-
 
573
    //             }
-
 
574
    //         } else {
-
 
575
    //             return new JsonModel([
-
 
576
    //                 'success' => false,
-
 
577
    //                 'data' => 'ERROR_METHOD_NOT_ALLOWED'
-
 
578
    //             ]);
-
 
579
    //         }
-
 
580
    //     } catch (\Throwable $e) {
-
 
581
    //             $e->getMessage();
-
 
582
    //             return new JsonModel([
-
 
583
    //                 'success' => false,
-
 
584
    //                 'data' => $e
-
 
585
    //             ]);
-
 
586
    //     }
-
 
587
    // }
-
 
588
 
233
 
589
    public function addAction() { 
234
    public function addAction() { 
590
        $currentUserPlugin  = $this->plugin('currentUserPlugin');
235
        $currentUserPlugin  = $this->plugin('currentUserPlugin');
591
        $currentCompany     = $currentUserPlugin->getCompany(); 
236
        $currentCompany     = $currentUserPlugin->getCompany(); 
Línea 1041... Línea 686...
1041
 
686
 
1042
                    $categoriesMapper = TopicMapper::getInstance($this->adapter);
687
                    $categoriesMapper = TopicMapper::getInstance($this->adapter);
Línea 1043... Línea 688...
1043
                    $category = $categoriesMapper->fetchOneByUuidOrTitle($categoryUuid);
688
                    $category = $categoriesMapper->fetchOneByUuidOrTitle($categoryUuid);
1044
 
-
 
-
 
689
 
1045
                    $feed->topic_id = $category->id;
690
                    $feed->topic_id = $category->id;
Línea 1046... Línea 691...
1046
 
691
                    $feed->status = Feed::STATUS_SAVED;
1047
                    if ($feedMapper->update($feed)) {
692
                    if ($feedMapper->update($feed)) {
Línea 1199... Línea 844...
1199
 
844
 
1200
    public function filterAction()
845
    public function filterAction()
1201
    {
846
    {
1202
        $request = $this->getRequest();
847
        $request = $this->getRequest();
1203
        $currentUserPlugin = $this->plugin('currentUserPlugin');
-
 
-
 
848
        $currentUserPlugin = $this->plugin('currentUserPlugin');
1204
 
849
        $currentUser = $currentUserPlugin->getUser();
Línea -... Línea 850...
-
 
850
        if ($request->isPost()) {
-
 
851
 
-
 
852
            $acl = $this->getEvent()->getViewModel()->getVariable('acl');
-
 
853
            $allowEdit = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/edit');
-
 
854
            $allowDelete = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/delete');
1205
        if ($request->isPost()) {
855
            $allowAproved = $acl->isAllowed($currentUser->usertype_id, 'development-and-content/waiting/aproved');
1206
 
856
 
1207
            $dataPost = $request->getPost()->toArray();
857
            $dataPost = $request->getPost()->toArray();
1208
            $items = [];
858
            $items = [];
Línea 1209... Línea 859...
1209
            $feedMapper = FeedMapper::getInstance($this->adapter);
859
            $feedMapper = FeedMapper::getInstance($this->adapter);
1210
            $paginator = $feedMapper->fetchAllByDevelopAndCategoryId($dataPost['category_id']);
860
            $paginator = $feedMapper->fetchAllByDevelopAndCategoryId($dataPost['category_id'], $allowEdit);
1211
 
861
 
1212
            foreach ($paginator as $record) {
862
            foreach ($paginator as $record) {
Línea 1227... Línea 877...
1227
                    'file_name' => $record->file_name ? $record->file_name : '',
877
                    'file_name' => $record->file_name ? $record->file_name : '',
1228
                    'link_file' => $this->url()->fromRoute('storage', ['code' => $record->uuid, 'type' => 'feed', 'filename' => $record->file_name]),
878
                    'link_file' => $this->url()->fromRoute('storage', ['code' => $record->uuid, 'type' => 'feed', 'filename' => $record->file_name]),
1229
                    'status' => $record->status,
879
                    'status' => $record->status,
1230
                    'preview' => $preview,
880
                    'preview' => $preview,
1231
                    'actions' => [
881
                    'actions' => [
1232
                        'link_edit' => $this->url()->fromRoute('development-and-content/waiting/edit', ['id' => $record->uuid]),
882
                        'link_edit' => ($allowEdit) ? $this->url()->fromRoute('development-and-content/waiting/edit', ['id' => $record->uuid]) : '',
1233
                        'link_get' => $this->url()->fromRoute('development-and-content/waiting/getContent', ['id' => $record->uuid]),
883
                        'link_get' => $this->url()->fromRoute('development-and-content/waiting/getContent', ['id' => $record->uuid]),
1234
                        'link_aproved' => $this->url()->fromRoute('development-and-content/waiting/aproved', ['id' => $record->uuid]),
884
                        'link_aproved' => ($allowAproved) ? $this->url()->fromRoute('development-and-content/waiting/aproved', ['id' => $record->uuid]) : '',
1235
                        'link_delete' => $this->url()->fromRoute('development-and-content/waiting/delete', ['id' => $record->uuid]),
885
                        'link_delete' => ($allowDelete) ? $this->url()->fromRoute('development-and-content/waiting/delete', ['id' => $record->uuid]) : ''
1236
                        'link_categories' => $this->url()->fromRoute('development-and-content/waiting/categories', ['id' => $record->uuid]),
-
 
1237
                    ]
886
                    ]
1238
                ];
887
                ];
Línea 1239... Línea 888...
1239
 
888
 
1240
                array_push($items, $item);
889
                array_push($items, $item);