public function doCheckIn($data, CheckInForm $form)
    {
        /** @var CheckInController $controller */
        $controller = $form->getController();
        $validator = CheckInValidator::create();
        $result = $validator->validate($data['TicketCode']);
        switch ($result['Code']) {
            case CheckInValidator::MESSAGE_CHECK_OUT_SUCCESS:
                $validator->getAttendee()->checkOut();
                break;
            case CheckInValidator::MESSAGE_CHECK_IN_SUCCESS:
                $validator->getAttendee()->checkIn();
                break;
        }
        
        $form->sessionMessage($result['Message'], strtolower($result['Type']), false);
        $this->extend('onAfterCheckIn', $response, $form, $result);
        return $response ? $response : $controller->redirect($controller->Link());
    }
public function doCheckIn($data, CheckInForm $form)
    {
        /** @var CheckInController $controller */
        $controller = $form->getController();
        $validator = CheckInValidator::create();
        $result = $validator->validate($data['TicketCode']);
        switch ($result['Code']) {
            case CheckInValidator::MESSAGE_CHECK_OUT_SUCCESS:
                $validator->getAttendee()->checkOut();
                break;
            case CheckInValidator::MESSAGE_CHECK_IN_SUCCESS:
                $validator->getAttendee()->checkIn();
                break;
        }
        
        $form->sessionMessage($result['Message'], strtolower($result['Type']), false);
        $this->extend('onAfterCheckIn', $response, $form, $result);
        return $response ? $response : $controller->redirect($controller->Link());
    }
public function doCheckIn ( $ data , CheckInForm $ form ) { /** @var CheckInController $controller */ $ controller = $ form -> getController ( ) ; $ validator = CheckInValidator :: create ( ) ; $ result = $ validator -> validate ( $ data [ 'TicketCode' ] ) ; switch ( $ result [ 'Code' ] ) { case CheckInValidator :: MESSAGE_CHECK_OUT_SUCCESS : $ validator -> getAttendee ( ) -> checkOut ( ) ; break ; case CheckInValidator :: MESSAGE_CHECK_IN_SUCCESS : $ validator -> getAttendee ( ) -> checkIn ( ) ; break ; } $ form -> sessionMessage ( $ result [ 'Message' ] , strtolower ( $ result [ 'Type' ] ) , false ) ; $ this -> extend ( 'onAfterCheckIn' , $ response , $ form , $ result ) ; return $ response ? $ response : $ controller -> redirect ( $ controller -> Link ( ) ) ; }
Do the check in, if all checks pass return a success

@param             $data
@param CheckInForm $form

@return \SS_HTTPResponse
Do the check in if all checks pass return a success