plugin/reservation/Manager/ReservationManager.php
public function completeJsonEventWithReservation(Reservation $reservation)
    {
        $color = $reservation->getResource()->getColor();

        return array_merge(
            $reservation->getEvent()->jsonSerialize(),
            [
                'color' => !empty($color) ? $color : '#3a87ad',
                'comment' => $reservation->getComment(),
                'resourceTypeId' => $reservation->getResource()->getResourceType()->getId(),
                'resourceTypeName' => $reservation->getResource()->getResourceType()->getName(),
                'resourceId' => $reservation->getResource()->getId(),
                'reservationId' => $reservation->getId(),
                'editable' => $this->hasAccess($reservation->getEvent()->getUser(), $reservation->getResource(), ReservationController::BOOK),
                'durationEditable' => $this->hasAccess($reservation->getEvent()->getUser(), $reservation->getResource(), ReservationController::BOOK),
            ]
        );
    }
public function completeJsonEventWithReservation(Reservation $reservation)
    {
        $color = $reservation->getResource()->getColor();

        return array_merge(
            $reservation->getEvent()->jsonSerialize(),
            [
                'color' => !empty($color) ? $color : '#3a87ad',
                'comment' => $reservation->getComment(),
                'resourceTypeId' => $reservation->getResource()->getResourceType()->getId(),
                'resourceTypeName' => $reservation->getResource()->getResourceType()->getName(),
                'resourceId' => $reservation->getResource()->getId(),
                'reservationId' => $reservation->getId(),
                'editable' => $this->hasAccess($reservation->getEvent()->getUser(), $reservation->getResource(), ReservationController::BOOK),
                'durationEditable' => $this->hasAccess($reservation->getEvent()->getUser(), $reservation->getResource(), ReservationController::BOOK),
            ]
        );
    }
public function completeJsonEventWithReservation ( Reservation $ reservation ) { $ color = $ reservation -> getResource ( ) -> getColor ( ) ; return array_merge ( $ reservation -> getEvent ( ) -> jsonSerialize ( ) , [ 'color' => ! empty ( $ color ) ? $ color : '#3a87ad' , 'comment' => $ reservation -> getComment ( ) , 'resourceTypeId' => $ reservation -> getResource ( ) -> getResourceType ( ) -> getId ( ) , 'resourceTypeName' => $ reservation -> getResource ( ) -> getResourceType ( ) -> getName ( ) , 'resourceId' => $ reservation -> getResource ( ) -> getId ( ) , 'reservationId' => $ reservation -> getId ( ) , 'editable' => $ this -> hasAccess ( $ reservation -> getEvent ( ) -> getUser ( ) , $ reservation -> getResource ( ) , ReservationController :: BOOK ) , 'durationEditable' => $ this -> hasAccess ( $ reservation -> getEvent ( ) -> getUser ( ) , $ reservation -> getResource ( ) , ReservationController :: BOOK ) , ] ) ; }
Add to the jsonSerialize, some reservations fields
Add to the jsonSerialize some reservations fields