OEModule\PatientTicketing\services\PatientTicketing_QueueService::canDeleteQueue PHP 메소드

canDeleteQueue() 공개 메소드

Check if the given Queue can be deleted (has no tickets assigned and no dependent queues with tickets).
public canDeleteQueue ( $queue_id ) : boolean
$queue_id
리턴 boolean
    public function canDeleteQueue($queue_id)
    {
        if ($this->getCurrentTicketCount($queue_id)) {
            return false;
        }
        $queue = $this->readModel($queue_id);
        foreach ($queue->getDependentQueueIds() as $dep_id) {
            if ($this->getCurrentTicketCount($dep_id)) {
                return false;
            }
        }
        return true;
    }