public function view()
    {
        $response = [
            'success' => false,
            'data' => [],
            'errors' => []
        ];

        if ($this->request->is(['post', 'patch', 'put'])) {
            $data = $this->request->getData();
            $result = $this->CalendarEvents->getEventInfo($data['id']);

            if (!empty($result)) {
                $response['success'] = true;
                $response['data'] = $result;
            } else {
                $response['errors'][] = "Couldn't find Event with id {$data['id']}";
            }
        }

        $this->set(compact('response'));
        $this->set('_serialize', 'response');
    }