Skip to content

Conversation

@kimleta
Copy link
Owner

@kimleta kimleta commented May 23, 2022

No description provided.

@kimleta kimleta requested a review from DarioPMM May 23, 2022 19:04
Comment on lines 67 to 70
title: title,
day: day,
genre: genre,
name: name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Znam da je od ranije, da nisam video tada, ali ovo mozes prebaciti u jednu niz variablu i nju poslati, pa sa druge strane iscitavati na taj nacin vrednosti.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uradio sam, samo mi nije bas najasnije zasto

Comment on lines 17 to 31
$connection = Drupal::database();

$reservationQuery = $connection->query("SELECT `reserved_movie_name`,`day_of_reservation` FROM `reservations`");
$reservationQueryResult = $reservationQuery->fetchAll();
$decodedReservationQuery = json_decode(json_encode($reservationQueryResult), true);

$reservedDays = [];
foreach ($decodedReservationQuery as $key => $value) {
$reservedDays[$value['reserved_movie_name']][$key] = $value['day_of_reservation'];
}

foreach ($reservedDays as $key => $value) {
$reservedDays[$key] = array_count_values($value);
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mora li ovo u sklopu ove funkcije? Ili moze negde odvojeno?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moze kao servis, samo mi neki problem iskakao, bas cu procitati ponovo kako se servisi pisu, vrv sam nesto propustio.

}
fclose($fileHandle);
} else {
}else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leva strana je kako treba, treba razmak posle zagrade.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatirao mi tako :)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nije tako formatirao, nego nisam usopte formatirao taj fajl :)

@kimleta kimleta requested a review from DarioPMM May 23, 2022 21:34
Comment on lines 18 to 22
$connection = Drupal::database();

$getReservations = new GetReservations();

$reservations = $getReservations->getReservations();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Razmisli malo, pa mi objasni zasto ovo ne bi trebalo da bude u sklopu content() funckije.

@kimleta kimleta requested a review from DarioPMM May 27, 2022 11:58
@kimleta kimleta requested review from DarioPMM and removed request for DarioPMM May 27, 2022 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants