OEModule\PatientTicketing\models\Queue::getCurrentTicketCount PHP Method

getCurrentTicketCount() public method

Get the number of tickets that are currently assigned to this queue.
public getCurrentTicketCount ( ) : array
return array
    public function getCurrentTicketCount()
    {
        $criteria = new \CDbCriteria();
        $criteria->addCondition('queue_assignments.id = (select id from ' . TicketQueueAssignment::model()->tableName() . ' cass where cass.ticket_id = t.id order by cass.assignment_date desc limit 1) and queue_assignments.queue_id = :qid');
        $criteria->params = array(':qid' => $this->id);
        return Ticket::model()->with('queue_assignments')->count($criteria);
    }