OEModule\PatientTicketing\controllers\DefaultController::actionStartTicketProcess PHP Метод

actionStartTicketProcess() публичный Метод

Action to mark the given ticket as being processed by the current user Redirects to the appropriate page for the user to process the patient.
public actionStartTicketProcess ( $ticket_id )
$ticket_id
    public function actionStartTicketProcess($ticket_id)
    {
        if (!($ticket = models\Ticket::model()->findByPk($ticket_id))) {
            throw new \CHttpException(404, 'Invalid ticket id.');
        }
        // check the user is permissioned to process the queueset the ticket is on
        $qs_svc = Yii::app()->service->getService(self::$QUEUESET_SERVICE);
        $qs_r = $qs_svc->getQueueSetForTicket($ticket_id);
        if (!$qs_svc->isQueueSetPermissionedForUser($qs_r, Yii::app()->user->id)) {
            throw new \CHttpException(403, "User does not have permission to manage queueset for ticket id {$ticket_id}");
        }
        // set the patient to be in processing for the current user
        $this->setTicketState($ticket, true, true);
        //set session variable to display patient ticket banner
        Yii::app()->session['patientticket_ticket_in_review'] = array('ticket_id' => $ticket_id, 'patient_id' => $ticket->patient->id);
        // redirect to the appropriate page for the ticket processing.
        $this->redirect($ticket->getSourceLink());
    }