| Línea 377... |
Línea 377... |
| 377 |
$capsuleComment->rating = strval($dataPost['rating']);
|
377 |
$capsuleComment->rating = strval($dataPost['rating']);
|
| 378 |
$capsuleComment->added_on = $dataPost['added_on'];
|
378 |
$capsuleComment->added_on = $dataPost['added_on'];
|
| Línea 379... |
Línea 379... |
| 379 |
|
379 |
|
| - |
|
380 |
|
| - |
|
381 |
$capsuleCommentMapper = MicrolearningCapsuleCommentMapper::getInstance($this->adapter);
|
| - |
|
382 |
$userMapper = UserMapper::getInstance($this->adapter);
|
| 380 |
|
383 |
$storage = Storage::getInstance($this->config, $this->adapter);
|
| 381 |
$capsuleCommentMapper = MicrolearningCapsuleCommentMapper::getInstance($this->adapter);
|
384 |
|
| Línea 382... |
Línea 385... |
| 382 |
$result = $capsuleCommentMapper->insert($capsuleComment);
|
385 |
$result = $capsuleCommentMapper->insert($capsuleComment);
|
| - |
|
386 |
if($result) {
|
| Línea 383... |
Línea 387... |
| 383 |
if($result) {
|
387 |
|
| Línea 392... |
Línea 396... |
| 392 |
'success' => true,
|
396 |
'success' => true,
|
| 393 |
'data' => [
|
397 |
'data' => [
|
| 394 |
'message' =>'LABEL_CAPSULE_COMMENT_HAVE_BEEN_SUCCESSFULLY_ADDED',
|
398 |
'message' =>'LABEL_CAPSULE_COMMENT_HAVE_BEEN_SUCCESSFULLY_ADDED',
|
| Línea 395... |
Línea 399... |
| 395 |
|
399 |
|
| - |
|
400 |
'comment' => [
|
| - |
|
401 |
'uuid' => $capsuleComment->uuid,
|
| - |
|
402 |
'date' => $capsuleComment->added_on,
|
| - |
|
403 |
'image' => $storage->getUserImage($capsuleCommentUser),
|
| - |
|
404 |
'fullname' => trim(trim($capsuleCommentUser->first_name) . ' ' . trim($capsuleCommentUser->last_name)),
|
| 396 |
'comment' => [
|
405 |
'rating' => strval($capsuleComment->rating),
|
| 397 |
'comment' => $capsuleComment->comment,
|
406 |
'comment' => $capsuleComment->comment,
|
| 398 |
'rating' => $capsuleComment->rating,
|
407 |
'rating' => $capsuleComment->rating,
|
| 399 |
'link_delete' => $this->url()->fromRoute('microlearning/capsules-comments/delete', ['capsule_id' => $capsule->uuid, 'comment_id' => $capsuleComment->uuid], ['force_canonical' => true])
|
408 |
'link_delete' => $this->url()->fromRoute('microlearning/capsules-comments/delete', ['capsule_id' => $capsule->uuid, 'comment_id' => $capsuleComment->uuid], ['force_canonical' => true])
|
| 400 |
],
|
409 |
],
|